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
ea93767d
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "02ba50c6104d40b745163fd14e84214b3db90112"
Commit
ea93767d
authored
May 24, 2018
by
Carl Case
Browse files
1804 RNN fix
parent
1737ce1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
apex/amp/wrap.py
apex/amp/wrap.py
+1
-1
No files found.
apex/amp/wrap.py
View file @
ea93767d
...
@@ -138,7 +138,7 @@ def rnn_cast(backend, fn, verbose=False):
...
@@ -138,7 +138,7 @@ def rnn_cast(backend, fn, verbose=False):
# autograd graph correctly backprops from the wgrads computed
# autograd graph correctly backprops from the wgrads computed
# inside cuDNN (on fp16 weights) into the fp32 weights.
# inside cuDNN (on fp16 weights) into the fp32 weights.
assert
utils
.
type_string
(
flat_weight
)
==
'FloatTensor'
assert
utils
.
type_string
(
flat_weight
)
==
'FloatTensor'
if
compat
.
tensor_is_float_tensor
():
if
compat
.
tensor_is_float_tensor
()
or
compat
.
tensor_is_variable
()
:
# Pre-0.4. A little slower, since it zeros out memory.
# Pre-0.4. A little slower, since it zeros out memory.
flat_weight_fp16
=
flat_weight
.
new
().
half
().
resize_
(
flat_weight
.
shape
)
flat_weight_fp16
=
flat_weight
.
new
().
half
().
resize_
(
flat_weight
.
shape
)
else
:
else
:
...
...
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