xnn.trfnn.models.equiformer_v2.FeedForwardNetwork#

class xnn.trfnn.models.equiformer_v2.FeedForwardNetwork(channels, hidden_channels, out_channels, lmax, activation, use_grid_mlp, resolution)[source]#

Bases: Module

The feed-forward network (Figure 1d): SO(3) linear, separable S2 activation, SO(3) linear.

Parameters:
  • channels (int) – Input, hidden and output channels.

  • hidden_channels (int) – Input, hidden and output channels.

  • out_channels (int) – Input, hidden and output channels.

  • lmax (int) – Highest degree.

  • activation (str) – "sep_s2", "s2" or "gate".

  • use_grid_mlp (bool) – A two-layer MLP on the sphere samples instead of a single SiLU (the paper’s).

  • resolution (int, optional) – Sphere samples.

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 Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:

x (Tensor)

Return type:

Tensor