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
deepspeed
Commits
3637b86b
"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "cca452f0b000fbfba7de52e7a33f93f94d8357e4"
Unverified
Commit
3637b86b
authored
Apr 04, 2020
by
kouml
Committed by
GitHub
Apr 03, 2020
Browse files
add representation to optimizer (#181)
parent
c1a3ec67
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
deepspeed/pt/deepspeed_zero_optimizer.py
deepspeed/pt/deepspeed_zero_optimizer.py
+3
-0
deepspeed/pt/fp16_optimizer.py
deepspeed/pt/fp16_optimizer.py
+3
-0
deepspeed/pt/fp16_unfused_optimizer.py
deepspeed/pt/fp16_unfused_optimizer.py
+3
-0
No files found.
deepspeed/pt/deepspeed_zero_optimizer.py
View file @
3637b86b
...
...
@@ -531,3 +531,6 @@ class FP16_DeepSpeedZeroOptimizer(object):
for
current
,
saved
in
zip
(
self
.
single_partition_of_fp32_groups
,
state_dict
[
'single_partition_of_fp32_groups'
]):
current
.
data
.
copy_
(
saved
.
data
)
def
__repr__
(
self
):
return
repr
(
self
.
optimizer
)
deepspeed/pt/fp16_optimizer.py
View file @
3637b86b
...
...
@@ -337,3 +337,6 @@ class FP16_Optimizer(object):
# are guaranteed to exist, so we can just copy_() from the saved master params.
for
current
,
saved
in
zip
(
self
.
fp32_groups_flat
,
state_dict
[
'fp32_groups_flat'
]):
current
.
data
.
copy_
(
saved
.
data
)
def
__repr__
(
self
):
return
repr
(
self
.
optimizer
)
deepspeed/pt/fp16_unfused_optimizer.py
View file @
3637b86b
...
...
@@ -325,3 +325,6 @@ class FP16_UnfusedOptimizer(object):
for
current_group
,
saved_group
in
zip
(
self
.
fp32_groups
,
state_dict
[
'fp32_groups'
]):
for
current
,
saved
in
zip
(
current_group
,
saved_group
):
current
.
data
.
copy_
(
saved
.
data
)
def
__repr__
(
self
):
return
repr
(
self
.
optimizer
)
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