mlx.core.conv3d

目录

mlx.core.conv3d#

conv3d(input: array, weight: array, /, stride: int | tuple[int, int, int] = 1, padding: int | tuple[int, int, int] = 0, dilation: int | tuple[int, int, int] = 1, groups: int = 1, *, stream: None | Stream | Device = None) array#

对具有多个通道的输入执行三维卷积

注意: 目前仅支持默认值 groups=1

参数:
  • input (array) – 形状为 (N, D, H, W, C_in) 的输入数组。

  • weight (array) – 形状为 (C_out, KD, KH, KW, C_in) 的权重数组。

  • stride (inttuple(int), 可选) – 大小为 3 的 tuple,表示卷积核步长。如果只指定一个数字,则所有空间维度使用相同的步长。默认值: 1

  • padding (inttuple(int), 可选) – 大小为 3 的 tuple,表示对称输入填充。如果只指定一个数字,则所有空间维度使用相同的填充。默认值: 0

  • dilation (inttuple(int), 可选) – 大小为 3 的 tuple,表示卷积核膨胀率。如果只指定一个数字,则所有空间维度使用相同的膨胀率。默认值: 1

  • groups (int, 可选) – 输入特征组。默认值: 1

返回:

卷积后的数组。

返回类型:

array