Giter Site home page Giter Site logo

littlefis / random-fourier-features-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jmclong/random-fourier-features-pytorch

0.0 0.0 0.0 8.39 MB

Implementation of "Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains" by Tancik et al.

License: MIT License

Python 100.00%

random-fourier-features-pytorch's Introduction

Random Fourier Features Pytorch

Python package Coverage Status Documentation Status

PyPI Downloads

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.

random-fourier-features-pytorch's People

Contributors

jmclong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.