Struct neuronika::nn::Conv3d [−][src]
pub struct Conv3d<Pad: PaddingMode> {
pub padding: (usize, usize, usize),
pub padding_mode: Pad,
pub stride: (usize, usize, usize),
pub dilation: (usize, usize, usize),
pub weight: Learnable<Ix5>,
pub bias: Learnable<Ix1>,
}
Expand description
Applies a volumetric convolution over an input signal composed of several input planes.
See also GroupedConv3d
.
Fields
padding: (usize, usize, usize)
padding_mode: Pad
stride: (usize, usize, usize)
dilation: (usize, usize, usize)
weight: Learnable<Ix5>
bias: Learnable<Ix1>
Implementations
Creates a new Conv3d.
Arguments
-
in_channels
- number of planes in the input signal. -
out_channels
- number of planes in the output signal. -
kernel_size
- size of the kernel, a 3-tuple for this three-dimensional case. -
padding
- padding to be applied to the input, a 3-tuple for this three-dimensional case. -
padding_mode
- padding mode, it can be:Zero
,Constant
,Reflective
orReplicative
. -
stride
- stride of the convolution, a 3-tuple for this three-dimensional case. -
dilation
- controls the spacing between the kernel points, a 3-tuple for this three-dimensional case.
The weight and the bias of the layer are initialized from U(-k, k) where
k = (1. /(in_channels * kernel_d * kernel_w * kernel_h) as f32).sqrt()
.
Computes a 3-dimensional convolution (cross correlation).
Arguments
input
- signal to convolve.
The input must be of shape (N, Cin, D, H, W)
- N is the batch size
- Cin is the number of input channels
- D is the depth of the input
- H is the height of the input
- W is the width of the input
The kernel must be of shape (Cout, Cin, Dk, Hk, Wk)
- Cout is the number of output channels
- Cin is the number of input channels
- Dk is the depth of the kernel
- Hk is the height of the kernel
- Wk is the width of the kernel
The resulting output shape will be (N, Cout, Dout, Hout, Wout)
Trait Implementations
Registers the weight and the bias of this Conv3d
instance.
Register self
’s status to the model’s status state status
.