psyrgkan / pypc

Predictive coding in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An implementation of predictive coding in Python, utilising pytorch for GPU acceleration. We compare the use of the free energy as a loss function vs mean squared error. In addition we also test these predictive coding networks against a normal backpropagation network.

License: MIT

Running

Free Energy Loss Function

python -m scripts.supervised

Mean Squared Error Loss Function

python -m scripts.supervised_mse

Backpropagation

python -m scripts.supervised_bp

Requirements

  • numpy
  • torch
  • torchvision

Authors

Extended by

About

Predictive coding in Python

License:MIT License


Languages

Language:Python 100.0%