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
ColossalAI
Commits
94329fc1
Unverified
Commit
94329fc1
authored
Nov 09, 2022
by
LuGY
Committed by
GitHub
Nov 09, 2022
Browse files
[NFC] polish colossalai/amp/apex_amp/__init__.py code style (#1853)
parent
32c8a033
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
colossalai/amp/apex_amp/__init__.py
colossalai/amp/apex_amp/__init__.py
+2
-1
No files found.
colossalai/amp/apex_amp/__init__.py
View file @
94329fc1
from
.apex_amp
import
ApexAMPOptimizer
import
torch.nn
as
nn
import
torch.nn
as
nn
from
torch.optim
import
Optimizer
from
torch.optim
import
Optimizer
from
.apex_amp
import
ApexAMPOptimizer
def
convert_to_apex_amp
(
model
:
nn
.
Module
,
optimizer
:
Optimizer
,
amp_config
):
def
convert_to_apex_amp
(
model
:
nn
.
Module
,
optimizer
:
Optimizer
,
amp_config
):
r
"""A helper function to wrap training components with Apex AMP modules
r
"""A helper function to wrap training components with Apex AMP modules
...
...
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