itay hubara

Results 16 comments of itay hubara

Please look at resnet_binary line 4, this line import binarize conv and fully connected operators: from .binarized_modules import BinarizeLinear,BinarizeConv2d If you look in binarized_modules .py line 13 you'll find your...

HardTanh is simply cliping the values to be between -1 and 1. Everything above 1 it sets to 1 and below -1 to -1, this helps the initial training phase....

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.

By using the HradTanhH you ensure that the gradients of STE is 0 when abs(activation) > 1 and 1 when abs(activation) < 1. Note that the STE is used over...

You need to download the ImageNet dataset from here http://www.image-net.org/challenges/LSVRC/2012/downloads (note that you must login for that) and then you can use torchvision to create a dataloader.

you don't have to inflate the network but it improves accuracy. WRPN paper: https://arxiv.org/abs/1709.01134

VGG_CIFAR10 is a very large network to begin with...

I just demonstrated how to change the model to BNN model on ResNet and vgg_cifar. You should replace the ReLU with HardTanH in all other models as well. Basically you...

You are right! the inputs here are float. However the input tensor contains only 256 unique values (as we started from uint8 images). If you wish you can remove the...

Hi Yonathan, Sorry for the delay. Sure, just follow the a training algorithm as appeared in the paper. You need to create a weights binarization function, replace the classic activation...