lpjiang97 / sparse-coding

An implementation of Olshausen and Field (96) in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sparse Coding

This is an implementation of Olshausen and Field's sparse coding paper in PyTorch. Iterative Shrinkage/Thresholding Algorithm (ISTA) is used to fit neuronal responses for the input. Gradients for receptive fields are calculated through PyTorh's autograd feature.

Run

To run the program:

cd src/scripts
python train.py 

To see a list of available hyperparameters to change:

python train.py -h

A checkpoint of the model is saved every 10 epochs to trained_models. To see the tensorboard logs:

tensorboard --logdir=runs

Will be added soon

  • Fast-ISTA

References

About

An implementation of Olshausen and Field (96) in PyTorch

License:MIT License


Languages

Language:Python 100.0%