BinaryNet.pytorch icon indicating copy to clipboard operation
BinaryNet.pytorch copied to clipboard

"input.size(1) != 3" and "if input.size(1) != 784" problem

Open Aebestach opened this issue 3 years ago • 2 comments

binarized_modules.py Hello, the author, I have some code in this document, I want to express anything else. input.size(1) != 784 in the binarizelinear class,input.size(1) != 3in the BinarizeConv2D class. What do they want to express?

Aebestach avatar Oct 10 '21 09:10 Aebestach

You can't binarize the input image so if the size is 784 (for MNIST) or size(1)=3 for any RGB image (i.e. Cifar10 ImageNet) then you don't binarize the input.

itayhubara avatar Oct 11 '21 06:10 itayhubara

@itayhubara Thank you, I understand.

Aebestach avatar Oct 12 '21 03:10 Aebestach