← all repositories

mpezeshki/pytorch_forward_forward

PyTorch implementation of Geoffrey Hinton's forward-forward neural network training algorithm that replaces back-propagation with local objective functions.

1.5k stars Python ML Frameworks
pytorch_forward_forward
Not currently ranked — collecting fresh signals.
star history

This repository implements the forward-forward (FF) training algorithm for neural networks. Unlike conventional backpropagation, FF computes gradients locally using a local objective function at each layer, eliminating the need to backpropagate errors. The algorithm trains layers by distinguishing positive samples (real data) from negative samples (generated fakes) based on layer output magnitudes relative to thresholds. After training all layers, predictions are made by finding the label that maximizes overall network activation. The implementation achieves around 6.8% test error on MNIST.

Frequently asked

What is mpezeshki/pytorch_forward_forward?
PyTorch implementation of Geoffrey Hinton's forward-forward neural network training algorithm that replaces back-propagation with local objective functions.
Is pytorch_forward_forward open source?
Yes — mpezeshki/pytorch_forward_forward is open source, released under the MIT license.
What language is pytorch_forward_forward written in?
mpezeshki/pytorch_forward_forward is primarily written in Python.
How popular is pytorch_forward_forward?
mpezeshki/pytorch_forward_forward has 1.5k stars on GitHub.
Where can I find pytorch_forward_forward?
mpezeshki/pytorch_forward_forward is on GitHub at https://github.com/mpezeshki/pytorch_forward_forward.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.