xnn.gnn.fast.linear.SpeciesTensorProduct#
- class xnn.gnn.fast.linear.SpeciesTensorProduct(*args, **kwargs)[source]#
Bases:
FullyConnectedTensorProduct,FastPathModuleTensor product with the one-hot chemical element of each atom, with a fast path.
An
e3nn.o3.FullyConnectedTensorProduct(same arguments, parameters andstate_dict) whose second input is one scalar irrep per element. With one-hot rows in that input, the product is a linear map of the first input chosen by each atom’s element. The fast path groups the atoms by element and applies each element’s map to its atoms only, instead of the reference’s product with every element. It runs outside CUDA-graph capture (grouping reads the element counts on the host) and when no gradient with respect to the element input is needed.