https://github.com/samyak2/fourier-dnn
Tensorflow 2.0 implementation of fourier feature mapping networks.
https://github.com/samyak2/fourier-dnn
fourier-features tensorflow
Last synced: about 2 months ago
JSON representation
Tensorflow 2.0 implementation of fourier feature mapping networks.
- Host: GitHub
- URL: https://github.com/samyak2/fourier-dnn
- Owner: Samyak2
- License: apache-2.0
- Created: 2020-07-27T16:54:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-10T09:50:02.000Z (over 5 years ago)
- Last Synced: 2025-02-27T02:51:05.349Z (over 1 year ago)
- Topics: fourier-features, tensorflow
- Language: Python
- Homepage:
- Size: 915 KB
- Stars: 1
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fourier-dnn

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"](https://arxiv.org/abs/2006.10739).
# 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)
```bash
pip install -e .
```
# Usage
Check out the [2D image regression example](fourier_dnn/2d_image_regression.py) for an example
usage.
Run the example using:
```bash
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](https://github.com/tancik/fourier-feature-networks))
Use `fourier_dnn.ffm_mlp.FourierMLP` to make a complete fourier feature mapping network.
For example:
```python
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
- [Effect of standard
deviation](https://app.wandb.ai/malthael/fourier-feature-dnn/reports/Effect-of-Standard-Deviation-on-Fourier-Feature-Networks--VmlldzoxODg1NDc)
- [Effect of learning
rate](https://app.wandb.ai/samyak/fourier-dnn/reports/Effect-of-learning-rate--VmlldzoxODg1Mjg)
- [Effect of number of Dense
units](https://app.wandb.ai/samyak/fourier-dnn/reports/Effect-of-number-of-Dense-units--VmlldzoxODg1NjQ)
- [Effect of standard deviation
2](https://app.wandb.ai/samyak/fourier-dnn/reports/Effect-of-number-of-Dense-units--VmlldzoxODg1NjQ)
- [Effect of number of
layers](https://app.wandb.ai/entherealenvy/fourier-dnn-fourier_dnn/reports/Fourier-DNN--VmlldzoxODg1MzI)