# LayerFreezing#

class composer.algorithms.LayerFreezing(freeze_start=0.5, freeze_level=1.0)[source]#

Progressively freeze the layers of the network during training, starting with the earlier layers.

Freezing starts after the fraction of training specified by freeze_start has elapsed. The fraction of layers frozen increases linearly until it reaches freeze_level at the end of training.

This freezing schedule is most similar to FreezeOut and Freeze Training.

Runs on Event.EPOCH_END.

Example

from composer.algorithms import LayerFreezing
from composer.trainer import Trainer
layer_freezing_algorithm = LayerFreezing(
freeze_start=0.0,
freeze_level=1.0
)
trainer = Trainer(
model=model,

• freeze_start (float) – The fraction of training to run before freezing begins. Default: 0.5.
• freeze_level (float) – The maximum fraction of layers to freeze. Default: 1.0.