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
4b954649
Commit
4b954649
authored
Mar 28, 2023
by
lucasliunju
Committed by
binmakeswell
Mar 29, 2023
Browse files
[NFC] polish colossalai/amp/__init__.py code style (#3272)
parent
6b3bb2c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
colossalai/amp/__init__.py
colossalai/amp/__init__.py
+6
-4
No files found.
colossalai/amp/__init__.py
View file @
4b954649
#!/usr/bin/env python
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# -*- encoding: utf-8 -*-
from
.amp_type
import
AMP_TYPE
from
colossalai.context
import
Config
import
torch.nn
as
nn
import
torch.nn
as
nn
from
torch.optim
import
Optimizer
from
torch.nn.modules.loss
import
_Loss
from
torch.nn.modules.loss
import
_Loss
from
.torch_amp
import
convert_to_torch_amp
from
torch.optim
import
Optimizer
from
colossalai.context
import
Config
from
.amp_type
import
AMP_TYPE
from
.apex_amp
import
convert_to_apex_amp
from
.apex_amp
import
convert_to_apex_amp
from
.naive_amp
import
convert_to_naive_amp
from
.naive_amp
import
convert_to_naive_amp
from
.torch_amp
import
convert_to_torch_amp
__all__
=
[
'convert_to_amp'
,
'convert_to_naive_amp'
,
'convert_to_apex_amp'
,
'convert_to_torch_amp'
,
'AMP_TYPE'
]
__all__
=
[
'convert_to_amp'
,
'convert_to_naive_amp'
,
'convert_to_apex_amp'
,
'convert_to_torch_amp'
,
'AMP_TYPE'
]
...
...
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