takyamamoto / SparseCoding-OlshausenField-Model

Sparse coding (Olshausen & Field, 1996)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sparse Coding (Olshausen & Field, 1996) Model

Sparse Coding (Olshausen & Field, 1996) Model with LCA (locally competitive algorithm) (Rozell et al., Neural Comput. 2008).

Data is from http://www.rctn.org/bruno/sparsenet/.

Requirement

  • Python >= 3.5
  • numpy, matplotlib, scipy, tqdm, sklearn

Usage

  • Run train.py or predictive-coding.ipynb (written in Japanese).
  • ica.py is implementation of ICA and PCA for Natural images.

Results

Loss function

Receptive fields (using soft threshold function)

Receptive fields (using Cauchy threshold function (Mayo et al., 2020))

ICA

PCA

Reference

About

Sparse coding (Olshausen & Field, 1996)


Languages

Language:Jupyter Notebook 99.6%Language:Python 0.4%