Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
06d035e3
Unverified
Commit
06d035e3
authored
Jun 21, 2018
by
Carl Case
Committed by
GitHub
Jun 21, 2018
Browse files
Merge pull request #13 from cclauss/patch-1
Type in variable name: hidden --> hiddens (w/ trailing 's')
parents
523be483
2e32e245
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
apex/amp/wrap.py
apex/amp/wrap.py
+4
-4
No files found.
apex/amp/wrap.py
View file @
06d035e3
...
@@ -191,11 +191,11 @@ def rnn_cast(backend, fn, verbose=False):
...
@@ -191,11 +191,11 @@ def rnn_cast(backend, fn, verbose=False):
# 2) Inputs: either a tuple (for LSTM) or single tensor
# 2) Inputs: either a tuple (for LSTM) or single tensor
if
isinstance
(
hiddens
,
tuple
):
if
isinstance
(
hiddens
,
tuple
):
new_args
.
append
(
tuple
(
cast_fn
(
x
)
for
x
in
hiddens
))
new_args
.
append
(
tuple
(
cast_fn
(
x
)
for
x
in
hiddens
))
elif
utils
.
is_fp_tensor
(
hidden
):
elif
utils
.
is_fp_tensor
(
hidden
s
):
new_args
.
append
(
cast_fn
(
hidden
))
new_args
.
append
(
cast_fn
(
hidden
s
))
else
:
else
:
# Hidden can, in principle, be `None` -- pass through
# Hidden
s
can, in principle, be `None` -- pass through
new_args
.
append
(
hidden
)
new_args
.
append
(
hidden
s
)
# 3) Batch sizes (0.4 or later only)
# 3) Batch sizes (0.4 or later only)
if
len
(
fargs
)
==
4
:
if
len
(
fargs
)
==
4
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment