composer.algorithms.stochastic_depth.stochastic_layers#

Stochastic forward functions for ResNet Bottleneck modules.

Functions

block_stochastic_forward

ResNet Bottleneck forward function where the layers are randomly skipped with probability drop_rate during training.

make_resnet_bottleneck_stochastic

Model surgery policy that dictates how to convert a ResNet Bottleneck layer into a stochastic version.

sample_stochastic_forward

ResNet Bottleneck forward function where samples are randomly dropped with probability drop_rate during training.

Classes

Bottleneck

torchvision.models.resnet.Bottleneck

composer.algorithms.stochastic_depth.stochastic_layers.block_stochastic_forward(self, x)[source]#

ResNet Bottleneck forward function where the layers are randomly skipped with probability drop_rate during training.

composer.algorithms.stochastic_depth.stochastic_layers.make_resnet_bottleneck_stochastic(module, module_index, module_count, drop_rate, drop_distribution, stochastic_method)[source]#

Model surgery policy that dictates how to convert a ResNet Bottleneck layer into a stochastic version.

composer.algorithms.stochastic_depth.stochastic_layers.sample_stochastic_forward(self, x)[source]#

ResNet Bottleneck forward function where samples are randomly dropped with probability drop_rate during training.