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
03a25ba8
Unverified
Commit
03a25ba8
authored
Apr 29, 2019
by
mcarilli
Committed by
GitHub
Apr 29, 2019
Browse files
Casting logic should reflatten RNN parameters
parent
1b8303d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
apex/fp16_utils/fp16util.py
apex/fp16_utils/fp16util.py
+2
-0
No files found.
apex/fp16_utils/fp16util.py
View file @
03a25ba8
...
...
@@ -65,6 +65,8 @@ def convert_network(network, dtype):
if
isinstance
(
module
,
torch
.
nn
.
modules
.
batchnorm
.
_BatchNorm
)
and
module
.
affine
is
True
:
continue
convert_module
(
module
,
dtype
)
if
isinstance
(
module
,
torch
.
nn
.
RNNBase
)
or
isinstance
(
module
,
torch
.
nn
.
modules
.
rnn
.
RNNBase
):
module
.
flatten_parameters
()
return
network
...
...
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