ApexMixedPrecisionPlugin¶
-
class
pytorch_lightning.plugins.precision.
ApexMixedPrecisionPlugin
(amp_level='O2')[source]¶ Bases:
pytorch_lightning.plugins.precision.mixed.MixedPrecisionPlugin
Mixed Precision Plugin based on Nvidia/Apex (https://github.com/NVIDIA/apex)
-
backward
(model, closure_loss, optimizer, opt_idx, should_accumulate, *args, **kwargs)[source]¶ performs the actual backpropagation
- Parameters
- Return type
-
master_params
(optimizer)[source]¶ The master params of the model. Returns the plain model params here. Maybe different in other precision plugins.
- Return type
Iterator
[Parameter
]
-