xnn.cnn.models.spherical.SphericalResBlock#
- class xnn.cnn.models.spherical.SphericalResBlock(n_in, n_out, b_in, b_out, s2_input, n_alpha=None, n_beta=2, n_gamma=2, max_beta=0.39269908169872414, normalization='batch', activation='relu')[source]#
Bases:
ModuleResNet block of the QM7 network (Sec. 5.4): correlation, batch norm, activation,
SO(3)correlation, batch norm, plus a shortcut of the input.- Parameters:
n_in (int) – Channels in and out.
n_out (int) – Channels in and out.
b_in (int) – Bandwidths in and out.
b_out (int) – Bandwidths in and out.
s2_input (bool) – Whether the input is a spherical signal (first block) or an
SO(3)signal.n_alpha (Optional[int]) – Filter support (near-identity grids of
n_betarings at polar angles up tomax_betawithn_alphaazimuths, andn_gammavalues ofgammaforSO(3)filters);n_alpha=Noneuses2 b_in.n_beta (int) – Filter support (near-identity grids of
n_betarings at polar angles up tomax_betawithn_alphaazimuths, andn_gammavalues ofgammaforSO(3)filters);n_alpha=Noneuses2 b_in.n_gamma (int) – Filter support (near-identity grids of
n_betarings at polar angles up tomax_betawithn_alphaazimuths, andn_gammavalues ofgammaforSO(3)filters);n_alpha=Noneuses2 b_in.max_beta (float) – Filter support (near-identity grids of
n_betarings at polar angles up tomax_betawithn_alphaazimuths, andn_gammavalues ofgammaforSO(3)filters);n_alpha=Noneuses2 b_in.normalization (str or None) –
"batch"(the paper) orNone.activation (str) – Activation between the two correlations.
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.