core.models.escaip.utils.stochastic_depth#
Modified from pytorch/vision
Classes#
Stochastic Depth for graph features. |
|
Skip Stochastic Depth for graph features. |
Functions#
|
Implements the Stochastic Depth from `"Deep Networks with Stochastic Depth" |
|
Module Contents#
- core.models.escaip.utils.stochastic_depth.stochastic_depth_2d(input: torch.Tensor, batch: torch.Tensor, p: float, training: bool = True) torch.Tensor #
Implements the Stochastic Depth from “Deep Networks with Stochastic Depth” used for randomly dropping residual branches of residual architectures.
- Parameters:
input (Tensor[num_nodes, ...]) – The input tensor or arbitrary dimensions with the first one being its node dimension.
batch (LongTensor[num_nodes]) – The batch tensor of the input tensor.
p (float) – probability of the input to be zeroed.
training – apply stochastic depth if is
True
. Default:True
- Returns:
The randomly zeroed tensor.
- Return type:
Tensor[N, …]
- core.models.escaip.utils.stochastic_depth.stochastic_depth_3d(input: torch.Tensor, batch: torch.Tensor, p: float, training: bool = True) torch.Tensor #