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
11faaca7
Unverified
Commit
11faaca7
authored
Apr 13, 2020
by
Mannat Singh
Committed by
GitHub
Apr 13, 2020
Browse files
Return internal optimizer's param_groups from LARC (#767)
parent
ca00adac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
apex/parallel/LARC.py
apex/parallel/LARC.py
+8
-1
No files found.
apex/parallel/LARC.py
View file @
11faaca7
...
@@ -37,7 +37,6 @@ class LARC(object):
...
@@ -37,7 +37,6 @@ class LARC(object):
"""
"""
def
__init__
(
self
,
optimizer
,
trust_coefficient
=
0.02
,
clip
=
True
,
eps
=
1e-8
):
def
__init__
(
self
,
optimizer
,
trust_coefficient
=
0.02
,
clip
=
True
,
eps
=
1e-8
):
self
.
param_groups
=
optimizer
.
param_groups
self
.
optim
=
optimizer
self
.
optim
=
optimizer
self
.
trust_coefficient
=
trust_coefficient
self
.
trust_coefficient
=
trust_coefficient
self
.
eps
=
eps
self
.
eps
=
eps
...
@@ -52,6 +51,14 @@ class LARC(object):
...
@@ -52,6 +51,14 @@ class LARC(object):
def
__repr__
(
self
):
def
__repr__
(
self
):
return
self
.
optim
.
__repr__
()
return
self
.
optim
.
__repr__
()
@
property
def
param_groups
(
self
):
return
self
.
optim
.
param_groups
@
param_groups
.
setter
def
param_groups
(
self
,
value
):
self
.
optim
.
param_groups
=
value
def
state_dict
(
self
):
def
state_dict
(
self
):
return
self
.
optim
.
state_dict
()
return
self
.
optim
.
state_dict
()
...
...
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