Convolution modules¶
Convolution modules own dense floating weights and delegate execution to the functional sparse convolution API. Use them for model composition when weights are learned or stored as module parameters.
Module summary¶
Module |
Coordinate support |
Functional equivalent |
|---|---|---|
|
Forward support or explicit target support. |
|
|
Input coordinate identity. |
|
|
Transposed relation support or an explicit positional target. |
|
|
Generated transpose-convolution support or an explicit positional target. |
|
|
Input coordinate identity. |
|
|
Transposed relation support or an explicit positional target. |
|
|
Generated transpose-convolution support or an explicit positional target. |
|
- class mlx_lattice.nn.conv.Conv3d(in_channels, out_channels, *, kernel_size=3, stride=1, padding=0, dilation=1, bias=True)[source]¶
Bases:
ModuleSparse 3D convolution module.
The module owns a dense 5D weight with layout
(C_out, Kx, Ky, Kz, C_in)and optional bias. The spatial axes arex, y, zwithzvarying fastest in flattened views. Calling the module delegates tomlx_lattice.ops.conv3d(); coordinate support follows the same forward or explicit-target semantics as the functional API.- Parameters:
- class mlx_lattice.nn.conv.ConvTranspose3d(in_channels, out_channels, *, kernel_size=2, stride=2, padding=0, dilation=1, bias=True)[source]¶
Bases:
ModuleSparse 3D transpose-convolution module.
Calling the module delegates to
mlx_lattice.ops.conv_transpose3d()and returns support generated by the transposed relation.- Parameters:
- class mlx_lattice.nn.conv.GenerativeConvTranspose3d(in_channels, out_channels, *, kernel_size=2, stride=2, bias=True)[source]¶
Bases:
ModuleGenerative sparse 3D transpose-convolution module.
Calling the module delegates to
mlx_lattice.ops.generative_conv_transpose3d()and generates output coordinates from input rows and stride.- Parameters:
- class mlx_lattice.nn.conv.NormalizedConvTranspose3d(in_channels, out_channels, *, kernel_size=2, stride=2, padding=0, dilation=1, bias=True, eps=1e-08)[source]¶
Bases:
ConvTranspose3dWeight-normalized sparse transpose convolution.
- class mlx_lattice.nn.conv.NormalizedGenerativeConvTranspose3d(in_channels, out_channels, *, kernel_size=2, stride=2, bias=True, eps=1e-08)[source]¶
Bases:
GenerativeConvTranspose3dWeight-normalized generative sparse transpose convolution.
- class mlx_lattice.nn.conv.NormalizedSubmConv3d(in_channels, out_channels, *, kernel_size=3, dilation=1, bias=True, eps=1e-08)[source]¶
Bases:
SubmConv3dWeight-normalized submanifold sparse convolution.
- class mlx_lattice.nn.conv.SubmConv3d(in_channels, out_channels, *, kernel_size=3, dilation=1, bias=True)[source]¶
Bases:
ModuleSubmanifold sparse 3D convolution module.
The output sparse tensor reuses input coordinate identity. Kernel sizes must be odd because the relation is centered on existing active rows.
- Parameters: