xnn.cnn.models.spherical.S2Convolution#
- class xnn.cnn.models.spherical.S2Convolution(n_in, n_out, b_in, b_out, points)[source]#
Bases:
ModuleS^2correlation layer (eq 4, computed by the Fourier theorem of Appendix D).The filter of every (input, output) channel pair is a set of values on the
pointsof the sphere; its spectrum is formed withs2_kernel_basis(), multiplied with the input spectrum as the outer productf^l psi^l+and transformed back onto theSO(3)grid of bandwidthb_out. The filter values are drawn uniformly in[-1, 1]and scaled by1 / sqrt(n_points n_in b_out^4 / b_in^2), the initialization of the reference implementation.- Parameters:
n_in (int) – Input and output channels.
n_out (int) – Input and output channels.
b_in (int) – Bandwidth of the input (
S^2grid of2 b_insamples per axis) and of the output (SO(3)grid of2 b_outsamples per axis;b_out <= b_in).b_out (int) – Bandwidth of the input (
S^2grid of2 b_insamples per axis) and of the output (SO(3)grid of2 b_outsamples per axis;b_out <= b_in).points (Tensor) – Filter support,
(n_points, 2)pairs(beta, alpha).
- filter_spectrum()[source]#
psi^l_mof every channel pair,(n_in, n_out, b_out, 2 b_out - 1).- Return type: