carloalbertobarbano / forward-forward-pytorch

PyTorch implementation of Hinton's FF Algorithm with hard negatives sampling
MIT License
14 stars 2 forks source link

Compatible with RGB images? #1

Open ajinkya-kulkarni opened 1 year ago

ajinkya-kulkarni commented 1 year ago

Hi, thanks for the repo! I was wondering if this package is compatible with a generic RGB dataset with labels for each image. Something like a CIFAR10 for example.

carloalbertobarbano commented 1 year ago

Hi thanks for the interest. Yes you can use RGB images, provided you adjust the input layer here https://github.com/carloalbertobarbano/forward-forward-pytorch/blob/a3aa3133b72166607a5f3c74a1cd4d4b5c25c542/mnist_ff.py#L162 with the correct size

ajinkya-kulkarni commented 1 year ago

Ahh thanks, I will try it. Another point, what is the function of hard_negatives and steps_per_block? I was not able to understand these two parameters.

carloalbertobarbano commented 1 year ago

I am going a bit by memory since I haven't worked with this for some time, but: