Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
torchani
Commits
d673f672
Commit
d673f672
authored
Aug 27, 2018
by
Xiang Gao
Browse files
L2 only on weight
parent
81c163e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
torchani/neurochem.py
torchani/neurochem.py
+1
-2
No files found.
torchani/neurochem.py
View file @
d673f672
...
@@ -509,8 +509,7 @@ class Trainer:
...
@@ -509,8 +509,7 @@ class Trainer:
if
'l2norm'
in
layer
:
if
'l2norm'
in
layer
:
if
layer
[
'l2norm'
]
==
1
:
if
layer
[
'l2norm'
]
==
1
:
c
=
layer
[
'l2valu'
]
c
=
layer
[
'l2valu'
]
for
w
in
module
.
parameters
():
l2reg
.
append
((
c
,
module
.
weight
))
l2reg
.
append
((
c
,
w
))
del
layer
[
'l2norm'
]
del
layer
[
'l2norm'
]
del
layer
[
'l2valu'
]
del
layer
[
'l2valu'
]
if
len
(
layer
)
>
0
:
if
len
(
layer
)
>
0
:
...
...
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