Module conv

Module conv 

Expand description

Module with convolution operations.

Functions§

calculate_conv_output_shape
Calculate the expected output shape [batch_size, channels_out, spatial_dims, ..] for a convolution.
calculate_conv_output_size
Calculate the expected output size when doing a convolution operation.
calculate_conv_output_sizes
Calculate the expected output sizes when doing a convolution operation.
calculate_conv_padding
Calculate the expected padding size required when applying a convolution.
calculate_conv_transpose_output_shape
Calculate the expected output shape [batch_size, channels_out, spatial_dims, ..] for a transposed convolution.
calculate_conv_transpose_output_size
Calculate the expected output size when doing a transposed convolution operation.
calculate_padding_out
Compute the padding_out for a transpose conv that exactly recovers the original size_in from size_out, accounting for any input elements the forward conv dropped. Shared by conv{1,2,3}d_x_backward and the CubeCL dgrad fallback so the two paths can’t drift.
calculate_pool_output_shape
Calculate the expected output shape [batch_size, channels_out, spatial_dims, ..] for a pooling operation.
calculate_pool_output_size
Calculate the expected output size when doing a pooling operation.