xnn.trfnn.models.equiformer.Gate#

class xnn.trfnn.models.equiformer.Gate(irreps_out)[source]#

Bases: Module

The gate activation (section 4.1): SiLU on the scalars, sigmoid gates on the other irreps.

The input is [scalars | gates | gated]; both activations are normalized to unit second moment, as in e3nn.

Parameters:

irreps_out (e3nn.o3.Irreps or str) – The irreps after the activation; irreps_in adds one gate scalar per gated channel.

forward(x)[source]#

Activate (N, irreps_in.dim) into (N, irreps_out.dim).

Parameters:

x (Tensor)

Return type:

Tensor