xnn.cnn.models.steerable.SteerableConv3d#
- class xnn.cnn.models.steerable.SteerableConv3d(fields_in, fields_out, kernel_size=5, n_gates=0, stride=1, padding=None, dilation=1, bandlimit='compromise', shell_width=0.6)[source]#
Bases:
ModuleSE(3)-equivariant 3D convolution between stacks of fields.
For every pair of output order
jand input orderlthe kernel block is a learned linear combination of theB_{jl}basis kernels ofsteerable_kernel_basis(), with one weight per (output field, input field, basis kernel); the blocks are stacked into one(K_out, K_in, s, s, s)filter bank forconv3d(Sec. 4.4.3). The basis of a block is scaled bysqrt((2j + 1) / (B_{jl} sum_l m_l))so that weights drawn fromN(0, 1)give outputs of unit variance (the initialization of the reference implementation). There is no bias: the biases of scalar fields live in the gated nonlinearity.- Parameters:
fields_in (sequence of int) – Multiplicities
(m_0, m_1, ...)of the input and output stacks.fields_out (sequence of int) – Multiplicities
(m_0, m_1, ...)of the input and output stacks.kernel_size (int, optional) – Side of the cubic kernel, by default 5.
n_gates (int, optional) – Extra scalar output fields appended after
fields_out(the gates ofGatedBlock), by default 0.stride (int, optional) – As in
conv3d;padding=Nonekeeps the grid size.padding (int, optional) – As in
conv3d;padding=Nonekeeps the grid size.dilation (int, optional) – As in
conv3d;padding=Nonekeeps the grid size.bandlimit (str or sequence of int, optional) – Shell bandlimits, see
shell_bandlimits().shell_width (float, optional) – Width of the radial Gaussian shells in voxels, by default 0.6.
- Variables:
weight (torch.nn.ParameterDict) –
"{i}_{j}"->(m_out, m_in, B)weights of output blockiand input blockj.
- kernel()[source]#
The filter bank spanned by the current weights,
(K_out, K_in, s, s, s).- Return type: