Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shashvatshah9/ffpytorch
Forward Forward Implementation improvements
https://github.com/shashvatshah9/ffpytorch
deep-learning forward-forward-algorithm neural-networks pytorch
Last synced: about 2 months ago
JSON representation
Forward Forward Implementation improvements
- Host: GitHub
- URL: https://github.com/shashvatshah9/ffpytorch
- Owner: shashvatshah9
- License: mit
- Created: 2023-05-03T19:56:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-05T05:59:40.000Z (about 1 year ago)
- Last Synced: 2024-11-01T02:03:09.499Z (2 months ago)
- Topics: deep-learning, forward-forward-algorithm, neural-networks, pytorch
- Language: Python
- Homepage:
- Size: 128 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FFPytorch
Forward Forward Implementation improvementsReferences
1. https://github.com/mohammadpz/pytorch_forward_forward
2. [Geoffrey Hinton's talk at NeurIPS 2022](https://www.cs.toronto.edu/~hinton/FFA13.pdf).Code Structure
FFEncoding - provides methods to overlay one-hot-encoded labels onto input data, either in the form of replacing the first 10 pixels of the data with the label or replacing the first 10 pixels in each channel of a 2D image with the corresponding label.
FFLayer - defines a feed-forward layer (FFLayer) that extends the Linear class from PyTorch. It takes input features, output features, an activation function, an optimizer, a threshold value, and other parameters.
FFNetwork - defines two classes: FFNetwork and FFNetworkBatched. FFNetwork is a feed-forward neural network module that sequentially passes inputs through layers, while FFNetworkBatched supports batched processing of inputs and applies the forward pass to each batch.How to run?
Assuming you have a python-supporting environment, which has available gpu(s), you can type this in the terminal *python base.py*.