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
b25030cc
Commit
b25030cc
authored
Nov 08, 2022
by
Genghan Zhang
Committed by
binmakeswell
Nov 09, 2022
Browse files
[NFC] polish ./colossalai/amp/torch_amp/__init__.py code style (#1836)
parent
b0a138aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
colossalai/amp/torch_amp/__init__.py
colossalai/amp/torch_amp/__init__.py
+6
-3
No files found.
colossalai/amp/torch_amp/__init__.py
View file @
b25030cc
from
typing
import
Optional
import
torch.nn
as
nn
from
torch.optim
import
Optimizer
from
torch.nn.modules.loss
import
_Loss
from
torch.optim
import
Optimizer
from
colossalai.context
import
Config
from
.torch_amp
import
TorchAMPOptimizer
,
TorchAMPModel
,
TorchAMPLoss
from
typing
import
Optional
from
.torch_amp
import
TorchAMPLoss
,
TorchAMPModel
,
TorchAMPOptimizer
def
convert_to_torch_amp
(
model
:
nn
.
Module
,
...
...
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