LayerSync — PyTorch Lightning 2.5.1.post0 documentation (original) (raw)
class lightning.pytorch.plugins.LayerSync[source]¶
Bases: ABC
Abstract base class for creating plugins that wrap layers of a model with synchronization logic for multiprocessing.
abstract apply(model)[source]¶
Override this method to apply synchronization to the layers of this model.
Return type:
abstract revert(model)[source]¶
Override this method to undo all modifications made in apply().
Return type: