Forward-Forward
Forward-Forward copied to clipboard
add multi-pass inference code
The code changes facilitate multi-pass inference: passing an image with the one hot labels encoded into the image in a different pixel each time and choosing the predicted label as the image that yielded maximum sum of squared activations.
- changed data loading to also load samples of images with each image having the label encoded in a different pixel (from first 10 pixels)
- added function to compute the multi-pass inference label
- added code in
main.py
to run the new inference duringvalidate_or_test
- added a config variable to run the code without needing to do this inference