Generative model of RGC and V1 simple cells.
A numpy and theano implementation of linear autoencoder NN trained on RGB images. The code was written for accomplishing my diploma thesis: "Modeling Color Vision with Coding Strategies of Retinal Ganglion Cells" and is not optimized, no unit tests and some clutter.
The file lookpy_rgb.tcl is derived of https://www2.informatik.uni-hamburg.de/~weber/code/lookpy.tcl and slightly extended to display .pnm files too. Whilst the included demon class is copied from here: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python.
Python 2.7
numpy (1.9.1) Theano (0.6.0)
matplotlib (1.4.2) scipy (0.15.1) scikit-learn (0.15.2)
Consult the command line parameter -h for help.
During training, a pickled state of the network is written to output_dir whilst .pgn and .pnm files are (over-)written in temp_dir.
Training the RGC model with 13*13*2 visible, 8*8 hidden units and with red and green components of RGB as training input:
python train.py -odir output_dir -tdir temp_dir -datadir images_dir -ncpu 3 -th -outn 10 -btchn 320 -mode rg rgc -vis 13 -hid 8 -k 5e-4 -clip -p .5 -lr .03
-
Extended RGC model based upon: Vincent, B. T. and Baddeley, R. J. Synaptic energy efficiency in retinal processing. Vision Research, 43, 2003
-
Extended V1 model based upon: Olshausen, B. A. and Field, D. J. Sparse coding with an overcomplete basis set - a strategy employed by V1? Vision Research, 37, 1997