Shortcuts

LayerSync

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:

Module

abstract revert(model)[source]

Override this method to undo all modifications made in apply().

Return type:

Module