Skip to main content

Module spatial

Module spatial 

Source

Structs§

AttentionModuleOptions
Options for attention.
ConvOptions
Convolution options.
ConvTransposeOptions
Transposed convolution options.
DeformConvOptions
Convolution options.
GridSampleOptions
Options for grid sampling operations.
InterpolateOptions
Interpolation options.
PaddedConvOptions
Convolution options with support for asymmetric padding.
UnfoldOptions
Unfold operation options.

Enums§

GridSamplePaddingMode
Padding mode for grid sampling when coordinates are out of bounds.
InterpolateMode
Algorithm used for upsampling.

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 Ruda 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.
calculate_unfold_shape
Calculate the output shape for an unfold operation.
calculate_unfold_windows
Calculate the number of unfolding windows that can be extracted from a dimension of given size.