composer.algorithms.stochastic_depth.sample_stochastic_layers#
composer.algorithms.stochastic_depth.sample_stochastic_layers
Classes
|
torchvision.models.resnet.Bottleneck |
Sample-wise stochastic ResNet Bottleneck block. |
- class composer.algorithms.stochastic_depth.sample_stochastic_layers.SampleStochasticBottleneck(drop_rate, **kwargs)[source]#
Bases:
torchvision.models.resnet.Bottleneck
Sample-wise stochastic ResNet Bottleneck block.
This block has a probability of dropping samples before the identity connection, then adds back the untransformed samples using the identity connection.
- Parameters
sample_drop_rate (float) โ The probability of dropping a sample within this block. Must be between 0.0 and 1.0.
**kwargs โ Used for the original Bottleneck initialization arguments.