Equivariant convolutional neural networks for the group E(3) of 3 dimensional rotations, translations, and mirrors.
Maintained. Last release 10 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install e3nnEuclidean neural networks
Documentation | Code | CHANGELOG | Colab
The aim of this library is to help the development of E(3) equivariant neural networks. It contains fundamental mathematical operations such as tensor products and spherical harmonics.

import torch
from e3nn import o3
# Create a random array made of scalar (0e) and a vector (1o)
irreps_in = o3.Irreps("0e + 1o")
x = irreps_in.randn(-1)
# Apply a linear layer
irreps_out = o3.Irreps("2x0e + 2x1o")
linear = o3.Linear(irreps_in=irreps_in, irreps_out=irreps_out)
y = linear(x)
# Compute a tensor product with itself
tp = o3.FullTensorProduct(irreps_in1=irreps_in, irreps_in2=irreps_in)
z = tp(x, x)
# Optionally compile the tensor product
tp_pt2 = torch.compile(tp, fullgraph=True)
z_pt2 = tp_pt2(x, x) # Warning: First few calls might be slow due to compilation
torch.testing.assert_close(z, z_pt2)
Installation
Important: install pytorch and only then run the command
pip install --upgrade pip
pip install --upgrade e3nn
For details and optional dependencies, see INSTALL.md
Breaking changes
e3nn is under development. It is recommended to install using pip. The main branch is considered as unstable. The second version number is incremented every time a breaking change is made to the code.