mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-27 07:47:05 +00:00
[NFC] polish colossalai/amp/__init__.py code style (#3272)
This commit is contained in:
parent
6b3bb2c249
commit
4b95464994
@ -1,14 +1,16 @@
|
|||||||
#!/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']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user