megengine.functional.nn.conv3d#

conv3d(inp, weight, bias=None, stride=1, padding=0, dilation=1, groups=1, conv_mode='cross_correlation')[source]#

3D convolution operation.

Refer to Conv3d for more information.

Parameters:
  • inp (Tensor) – feature map of the convolution operation.

  • weight (Tensor) – convolution kernel.

  • bias (Optional[Tensor]) – bias added to the result of convolution (if given).

  • stride (Union[int, Tuple[int, int, int]]) – stride of the 3D convolution operation. Default: 1

  • padding (Union[int, Tuple[int, int, int]]) – size of the paddings added to the input on both sides of its spatial dimensions. Only zero-padding is supported. Default: 0

  • dilation (Union[int, Tuple[int, int, int]]) – dilation of the 3D convolution operation. Default: 1

  • groups (int) – number of groups into which the input and output channels are divided, so as to perform a grouped convolution. When groups is not 1, in_channels and out_channels must be divisible by groups, and the shape of weight should be (groups, out_channel // groups, in_channels // groups, depth, height, width). Default: 1

  • conv_mode (str) – supports “cross_correlation”. Default: “cross_correlation”

Return type:

Tensor

Returns:

output tensor.