xnn.gnn.models.blocks.RadialNet#
- class xnn.gnn.models.blocks.RadialNet(hs, act=None, variance_in=1, variance_out=1, out_act=False)[source]#
Bases:
FullyConnectedNetPer-edge radial network that can recompute its hidden layers in the backward.
An
e3nn.nn.FullyConnectedNet(same parameters,state_dictkeys and outputs). When a gradient flows through it (forces, stress), the hidden layers’ activations,E x hiddenper layer whatever the tensor product’s size, are kept for the backward pass; with recomputation only the last hidden output is kept and the hidden layers run again in the backward, giving the same values. TorchScript always keeps the activations.- Variables:
recompute (str) –
"auto"(default): recompute in evaluation mode fromRECOMPUTE_MIN_EDGESedges;"on": whenever a gradient is needed;"off": never. Set withset_recompute_radial().- Parameters: