Skip to content

Tensorflow 2.0 implementation of fourier feature mapping networks.

License

Notifications You must be signed in to change notification settings

Samyak2/fourier-dnn

Repository files navigation

fourier-dnn

Tests

Tensorflow 2.0 implementation of fourier feature mapping networks.

Based on the paper "Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domains".

Results

Results after training fourier feature mapping models for around 100-200 epochs.

Setup

  • Git clone
  • Install the package locally (the -e flag means that any changes you make here in the code will be reflected in the package)
    pip install -e .

Usage

Check out the 2D image regression example for an example usage.

Run the example using:

python ./fourier_dnn/2d_image_regression.py 3 100

where 3 is the image index from the dataset (of 16 images) and 100 is the number of epochs. (Dataset taken from the original implementation)

Use fourier_dnn.ffm_mlp.FourierMLP to make a complete fourier feature mapping network. For example:

model = FourierMLP(10, 256, 3,
                   gaussian=True, staddev=16,
                   num_units_FFM=256)

Use fourier_dnn.metrics.PSNR as a metric for model.compile to get PSNR values on every epoch.

Weights and Biases reports

About

Tensorflow 2.0 implementation of fourier feature mapping networks.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages