Random Fourier Features Pytorch
Random Fourier Features Pytorch is an implementation of "Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains" by Tancik et al. designed to fit seamlessly into any PyTorch project.
Installation
Use the package manager pip to install the package.
pip install random-fourier-features-pytorch
Usage
See the documentation for more details, but here are a few simple usage examples:
Gaussian Encoding
import torch
import rff
X = torch.randn((256, 256, 2))
encoding = rff.layers.GaussianEncoding(sigma=10.0, input_size=2, encoded_size=256)
Xp = encoding(X)
Basic Encoding
import torch
import rff
X = torch.randn((256, 256, 2))
encoding = rff.layers.BasicEncoding()
Xp = encoding(X)
Positional Encoding
import torch
import rff
X = torch.randn((256, 256, 2))
encoding = rff.layers.PositionalEncoding(sigma=1.0, m=10)
Xp = encoding(X)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Citation
If you end up using this repository, please cite it as:
@article{long2021rffpytorch,
title={Random Fourier Features Pytorch},
author={Joshua M. Long},
journal={GitHub. Note: https://github.com/jmclong/random-fourier-features-pytorch},
year={2021}
}
also cite the original work
@misc{tancik2020fourier,
title={Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains},
author={Matthew Tancik and Pratul P. Srinivasan and Ben Mildenhall and Sara Fridovich-Keil and Nithin Raghavan and Utkarsh Singhal and Ravi Ramamoorthi and Jonathan T. Barron and Ren Ng},
year={2020},
eprint={2006.10739},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
License
This is released under the MIT license found in the LICENSE file.
Metadata
Release files for random-fourier-features-pytorch 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| random-fourier-features-pytorch-1.0.1.tar.gz | 5.9 kB | Without provenance | Details for random-fourier-features-pytorch-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| random_fourier_features_pytorch-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for random_fourier_features_pytorch-1.0.1-py3-none-any.whl |
Total release size: 12.0 kB
Release files / random-fourier-features-pytorch-1.0.1.tar.gz
| Download URL | random-fourier-features-pytorch-1.0.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04127161c5eae37a5dd4ea108acc5b934a8f702ca40457f9ef5cfc5268344bf8
|
|
BLAKE2b-256 checksum How to use checksums |
59f504f38f754ebfdf19e9328d3a06c5ca2abc222448f18a7d6915856bcbfd18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / random_fourier_features_pytorch-1.0.1-py3-none-any.whl
| Download URL | random_fourier_features_pytorch-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f3c01e15e8d5c9902b7cc67ca71b056a1c90768bb3d57f45b1043be29808534
|
|
BLAKE2b-256 checksum How to use checksums |
79f8bdc1b5c8cb52fb0a46076b56cd1b8f1fe2e905f8e9b66b7774a0f1a6b8eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for random-fourier-features-pytorch 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.