Trait ModuleOps
pub trait ModuleOps<B>where
B: Backend,{
Show 45 methods
// Required methods
fn conv2d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive;
fn deform_conv2d(
x: <B as Backend>::FloatTensorPrimitive,
offset: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
mask: Option<<B as Backend>::FloatTensorPrimitive>,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: DeformConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive;
fn deform_conv2d_backward(
x: <B as Backend>::FloatTensorPrimitive,
offset: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
mask: Option<<B as Backend>::FloatTensorPrimitive>,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: DeformConvOptions<2>,
) -> DeformConv2dBackward<B>;
fn conv3d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive;
fn conv_transpose2d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive;
fn conv_transpose3d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive;
fn avg_pool2d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive;
fn avg_pool2d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive;
fn adaptive_avg_pool2d(
x: <B as Backend>::FloatTensorPrimitive,
output_size: [usize; 2],
) -> <B as Backend>::FloatTensorPrimitive;
fn adaptive_avg_pool2d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive;
fn max_pool2d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
) -> <B as Backend>::FloatTensorPrimitive;
fn max_pool2d_with_indices(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
) -> MaxPool2dWithIndices<B>;
fn max_pool2d_with_indices_backward(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool2dBackward<B>;
fn interpolate(
x: <B as Backend>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <B as Backend>::FloatTensorPrimitive;
fn interpolate_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <B as Backend>::FloatTensorPrimitive;
// Provided methods
fn embedding(
weights: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn embedding_backward(
weights: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv1d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv1d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv2d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv3d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose1d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose1d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose2d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose3d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn conv_transpose3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn unfold4d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
options: UnfoldOptions,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn adaptive_avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
output_size: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn adaptive_avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn max_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
) -> <B as Backend>::FloatTensorPrimitive { ... }
fn max_pool1d_with_indices(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
) -> MaxPool1dWithIndices<B> { ... }
fn max_pool1d_with_indices_backward(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool1dBackward<B> { ... }
}
Expand description
Module operations trait.
Required Methods§
fn conv2d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Two dimensional convolution.
§Shapes
x: [batch_size, channels_in, height, width]
,
weight: [channels_out, channels_in, kernel_size_1, kernel_size_2]
,
bias: [channels_out]
,
fn deform_conv2d(
x: <B as Backend>::FloatTensorPrimitive,
offset: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
mask: Option<<B as Backend>::FloatTensorPrimitive>,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: DeformConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn deform_conv2d( x: <B as Backend>::FloatTensorPrimitive, offset: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, mask: Option<<B as Backend>::FloatTensorPrimitive>, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: DeformConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Two dimensional deformable convolution.
§Shapes
x: [batch_size, channels_in, height, width]
,
weight: [channels_out, channels_in, kernel_size_1, kernel_size_2]
,
bias: [channels_out]
,
fn deform_conv2d_backward(
x: <B as Backend>::FloatTensorPrimitive,
offset: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
mask: Option<<B as Backend>::FloatTensorPrimitive>,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: DeformConvOptions<2>,
) -> DeformConv2dBackward<B>
fn deform_conv2d_backward( x: <B as Backend>::FloatTensorPrimitive, offset: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, mask: Option<<B as Backend>::FloatTensorPrimitive>, bias: Option<<B as Backend>::FloatTensorPrimitive>, output_grad: <B as Backend>::FloatTensorPrimitive, options: DeformConvOptions<2>, ) -> DeformConv2dBackward<B>
Backward pass for the deform_conv2d operation.
fn conv3d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Three dimensional convolution.
§Shapes
x: [batch_size, channels_in, depth, height, width]
,
weight: [channels_out, channels_in, kernel_size_1, kernel_size_2, kernel_size_3]
,
bias: [channels_out]
,
fn conv_transpose2d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Two dimensional transposed convolution.
§Shapes
x: [batch_size, channels_in, height, width]
,
weight: [channels_in, channels_out, kernel_size_1, kernel_size_2]
,
bias: [channels_out]
,
fn conv_transpose3d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Three dimensional transposed convolution.
§Shapes
x: [batch_size, channels_in, height, width]
,
weight: [channels_in, channels_out, kernel_size_1, kernel_size_2, kernel_size_3]
,
bias: [channels_out]
,
fn avg_pool2d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool2d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool2d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool2d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], count_include_pad: bool, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the avg pooling 2d operation.
fn adaptive_avg_pool2d(
x: <B as Backend>::FloatTensorPrimitive,
output_size: [usize; 2],
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool2d( x: <B as Backend>::FloatTensorPrimitive, output_size: [usize; 2], ) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool2d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool2d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 2d operation.
fn max_pool2d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
) -> <B as Backend>::FloatTensorPrimitive
fn max_pool2d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ) -> <B as Backend>::FloatTensorPrimitive
fn max_pool2d_with_indices(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
) -> MaxPool2dWithIndices<B>
fn max_pool2d_with_indices( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], ) -> MaxPool2dWithIndices<B>
fn max_pool2d_with_indices_backward(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
dilation: [usize; 2],
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool2dBackward<B>
fn max_pool2d_with_indices_backward( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], stride: [usize; 2], padding: [usize; 2], dilation: [usize; 2], output_grad: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> MaxPool2dBackward<B>
Backward pass for the max pooling 2d operation.
fn interpolate(
x: <B as Backend>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <B as Backend>::FloatTensorPrimitive
fn interpolate( x: <B as Backend>::FloatTensorPrimitive, output_size: [usize; 2], options: InterpolateOptions, ) -> <B as Backend>::FloatTensorPrimitive
fn interpolate_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
output_size: [usize; 2],
options: InterpolateOptions,
) -> <B as Backend>::FloatTensorPrimitive
fn interpolate_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, output_size: [usize; 2], options: InterpolateOptions, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the interpolate operation.
Provided Methods§
fn embedding(
weights: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn embedding( weights: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn embedding_backward(
weights: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn embedding_backward( weights: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
fn conv1d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
One dimensional convolution.
§Shapes
x: [batch_size, channels_in, length]
,
weight: [channels_out, channels_in, kernel_size]
,
bias: [channels_out]
,
fn conv1d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for x
.
fn conv1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for weight
.
fn conv1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv1d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv1d operation, returning the gradient for bias
.
fn conv2d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for x
.
fn conv2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for weight
.
fn conv2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv2d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv2d operation, returning the gradient for bias
.
fn conv3d_x_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_x_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for x
.
fn conv3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for weight
.
fn conv3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv3d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv3d operation, returning the gradient for bias
.
fn conv_transpose1d(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
bias: Option<<B as Backend>::FloatTensorPrimitive>,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, bias: Option<<B as Backend>::FloatTensorPrimitive>, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
One dimensional transposed convolution.
§Shapes
x: [batch_size, channels_in, length]
,
weight: [channels_in, channels_out, length]
,
bias: [channels_out]
,
fn conv_transpose1d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for x
.
fn conv_transpose1d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<1>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<1>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for weight
.
fn conv_transpose1d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose1d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 1d operation, returning the gradient for bias
.
fn conv_transpose2d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for x
.
fn conv_transpose2d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<2>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<2>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for weight
.
fn conv_transpose2d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose2d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 2d operation, returning the gradient for bias
.
fn conv_transpose3d_x_backward(
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_x_backward( weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for x
.
fn conv_transpose3d_weight_backward(
x: <B as Backend>::FloatTensorPrimitive,
weight: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
options: ConvTransposeOptions<3>,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_weight_backward( x: <B as Backend>::FloatTensorPrimitive, weight: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, options: ConvTransposeOptions<3>, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for weight
.
fn conv_transpose3d_bias_backward(
x: <B as Backend>::FloatTensorPrimitive,
bias: <B as Backend>::FloatTensorPrimitive,
output_grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn conv_transpose3d_bias_backward( x: <B as Backend>::FloatTensorPrimitive, bias: <B as Backend>::FloatTensorPrimitive, output_grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the conv transpose 3d operation, returning the gradient for bias
.
fn unfold4d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: [usize; 2],
options: UnfoldOptions,
) -> <B as Backend>::FloatTensorPrimitive
fn unfold4d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: [usize; 2], options: UnfoldOptions, ) -> <B as Backend>::FloatTensorPrimitive
Four-dimensional unfolding.
§Shapes
x: [batch_size, channels_in, height, width]
,
returns: [batch_size, channels_in * kernel_size_1 * kernel_size_2, number of blocks]
,
fn avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool1d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
count_include_pad: bool,
) -> <B as Backend>::FloatTensorPrimitive
fn avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, count_include_pad: bool, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the avg pooling 1d operation.
fn adaptive_avg_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
output_size: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool1d( x: <B as Backend>::FloatTensorPrimitive, output_size: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool1d_backward(
x: <B as Backend>::FloatTensorPrimitive,
grad: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
fn adaptive_avg_pool1d_backward( x: <B as Backend>::FloatTensorPrimitive, grad: <B as Backend>::FloatTensorPrimitive, ) -> <B as Backend>::FloatTensorPrimitive
Backward pass for the adaptive avg pooling 1d operation.
fn max_pool1d(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
) -> <B as Backend>::FloatTensorPrimitive
fn max_pool1d( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ) -> <B as Backend>::FloatTensorPrimitive
fn max_pool1d_with_indices(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
) -> MaxPool1dWithIndices<B>
fn max_pool1d_with_indices( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, ) -> MaxPool1dWithIndices<B>
fn max_pool1d_with_indices_backward(
x: <B as Backend>::FloatTensorPrimitive,
kernel_size: usize,
stride: usize,
padding: usize,
dilation: usize,
output_grad: <B as Backend>::FloatTensorPrimitive,
indices: <B as Backend>::IntTensorPrimitive,
) -> MaxPool1dBackward<B>
fn max_pool1d_with_indices_backward( x: <B as Backend>::FloatTensorPrimitive, kernel_size: usize, stride: usize, padding: usize, dilation: usize, output_grad: <B as Backend>::FloatTensorPrimitive, indices: <B as Backend>::IntTensorPrimitive, ) -> MaxPool1dBackward<B>
Backward pass for the max pooling 1d operation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.