Skip to main content

Frame Averaging

Project description

Frame Averaging - Pytorch (wip)

Pytorch implementation of a simple way to enable (Stochastic) Frame Averaging for any network

Install

$ pip install frame-averaging-pytorch

Usage

import torch
from frame_averaging_pytorch import FrameAverage

# contrived neural network

net = torch.nn.Linear(3, 3)

# wrap the network with FrameAverage

net = FrameAverage(
    net,
    stochastic = True  # whether to use stochastic variant from FAENet (one frame sampled at random)
)

# pass your input to the network as usual

points = torch.randn(2, 4, 1024, 3)

out = net(points)

out.shape # (2, 4, 1024, 3)

# frame averaging is automatically taken care of, as though the network were unwrapped

Citations

@article{Puny2021FrameAF,
    title   = {Frame Averaging for Invariant and Equivariant Network Design},
    author  = {Omri Puny and Matan Atzmon and Heli Ben-Hamu and Edward James Smith and Ishan Misra and Aditya Grover and Yaron Lipman},
    journal = {ArXiv},
    year    = {2021},
    volume  = {abs/2110.03336},
    url     = {https://api.semanticscholar.org/CorpusID:238419638}
}
@article{Duval2023FAENetFA,
    title   = {FAENet: Frame Averaging Equivariant GNN for Materials Modeling},
    author  = {Alexandre Duval and Victor Schmidt and Alex Hernandez Garcia and Santiago Miret and Fragkiskos D. Malliaros and Yoshua Bengio and David Rolnick},
    journal = {ArXiv},
    year    = {2023},
    volume  = {abs/2305.05577},
    url     = {https://api.semanticscholar.org/CorpusID:258564608}
}

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

frame_averaging_pytorch-0.0.3.tar.gz (219.9 kB view details)

Uploaded Source

Built Distribution

frame_averaging_pytorch-0.0.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file frame_averaging_pytorch-0.0.3.tar.gz.

File metadata

File hashes

Hashes for frame_averaging_pytorch-0.0.3.tar.gz
Algorithm Hash digest
SHA256 292b10934df0a34afef7b67437f1703d1ba29c3e8c69e75a0760808e949a0a2c
MD5 cc4ca3bb7b55e85c18b4aa178a23cb3f
BLAKE2b-256 274b6b0990f0dcfa80e6964debacd21f89b00fffcc437f9ecaf3ee595570d84d

See more details on using hashes here.

File details

Details for the file frame_averaging_pytorch-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for frame_averaging_pytorch-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 669eff7bd7328ec85e5f0f2cd951e1e01c52c1b45524685b3f099e161ac1f059
MD5 50eb11ec35e87e09d09bfa42056f4504
BLAKE2b-256 e456a96a60b98a8368dd297ebdf0c4b7b9ba22bbdfad1222cc2817b4b3fce993

See more details on using hashes here.

Supported by

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