Skip to main content

Equivariant convolutional neural networks for the group E(3) of 3 dimensional rotations, translations, and mirrors.

Project description

e3nn

Coverage Status

E(3) is the Euclidean group in dimension 3. That is the group of rotations, translations and mirror. e3nn is a pytorch library that aims to create E(3) equivariant neural networks.

Installation

After having installed pytorch_geometric run the command:

pip install e3nn

To get the CUDA kernels read the instructions in INSTALL.md.

Example

from functools import partial

import torch

from e3nn import rs
from e3nn.kernel import Kernel
from e3nn.non_linearities.norm import Norm
from e3nn.non_linearities.rescaled_act import swish
from e3nn.point.operations import Convolution
from e3nn.radial import GaussianRadialModel

# Define the input and output representations
Rs_in = [(1, 0), (2, 1)]  # Input = One scalar plus two vectors
Rs_out = [(1, 1)]  # Output = One single vector

# Radial model:  R+ -> R^d
RadialModel = partial(GaussianRadialModel, max_radius=3.0, number_of_basis=3, h=100, L=1, act=swish)

# kernel: composed on a radial part that contains the learned parameters
#  and an angular part given by the spherical hamonics and the Clebsch-Gordan coefficients
K = partial(Kernel, RadialModel=RadialModel)

# Create the convolution module
conv = Convolution(K(Rs_in, Rs_out))

# Module to compute the norm of each irreducible component
norm = Norm(Rs_out)


n = 5  # number of input points
features = rs.randn(1, n, Rs_in, requires_grad=True)
in_geometry = torch.randn(1, n, 3)
out_geometry = torch.zeros(1, 1, 3)  # One point at the origin


out = norm(conv(features, in_geometry, out_geometry))
out.backward()

print(out)
print(features.grad)

Example for point cloud: tetris

Hierarchy

  • e3nn contains the library
    • e3nn/o3.py O(3) irreducible representations
    • e3nn/rsh.py real spherical harmonics
    • e3nn/rs.py geometrical tensor representations
    • e3nn/image contains voxels linear operations
    • e3nn/point contains points linear operations
    • e3nn/non_linearities non linearities operations
  • examples simple scripts and experiments

Citing

DOI

@software{e3nn_2020_3723557,
  author       = {Mario Geiger and
                  Tess Smidt and
                  Benjamin K. Miller and
                  Wouter Boomsma and
                  Kostiantyn Lapchevskyi and
                  Maurice Weiler and
                  Michał Tyszkiewicz and
                  Jes Frellsen},
  title        = {github.com/e3nn/e3nn},
  month        = may,
  year         = 2020,
  publisher    = {Zenodo},
  version      = {0.0.0},
  doi          = {10.5281/zenodo.3723557},
  url          = {https://doi.org/10.5281/zenodo.3723557}
}

Copyright

Euclidean neural networks (e3nn) Copyright (c) 2020, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Ecole Polytechnique Federale de Lausanne (EPFL), Free University of Berlin and Kostiantyn Lapchevskyi. All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

e3nn-0.1.1.tar.gz (68.9 kB view details)

Uploaded Source

Built Distribution

e3nn-0.1.1-py3-none-any.whl (89.7 kB view details)

Uploaded Python 3

File details

Details for the file e3nn-0.1.1.tar.gz.

File metadata

  • Download URL: e3nn-0.1.1.tar.gz
  • Upload date:
  • Size: 68.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for e3nn-0.1.1.tar.gz
Algorithm Hash digest
SHA256 70543da0556609c864e0e224298db20ec41312ef2057475cd5501cb9f019e8ed
MD5 1687a60a61d56a590c5a5783a6c69007
BLAKE2b-256 e72a3fe001f618e0a6f77b9a580ce7750fbfea48fe1e808ccfd9eb90bf219e56

See more details on using hashes here.

File details

Details for the file e3nn-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: e3nn-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 89.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for e3nn-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 980b2d16a0fc6006713aa368dcc14a97f60d9491c45437dd216cf1894a8d5d7c
MD5 b10261101b989d09167939dc7a6e24d9
BLAKE2b-256 ebbd22d3d52aaa4f848364b0716a653ae8657385e271b0e31814cdb737727dd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page