MatthieuCourbariaux / BinaryNet

Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1
BSD 3-Clause "New" or "Revised" License
1.04k stars 346 forks source link

Implementation on PyTorch #23

Closed wlgns0105 closed 6 years ago

wlgns0105 commented 6 years ago

I'm trying to implement BinaryNet on PyTorch and trying to train on CIFAR-10 dataset, I have some questions

  1. Is BNN (Binarized Neural Networks) same as BinaryNet ?

both paper writes their CIFAR-10 test error rate as 11.40% and BNN's code link goes to BinaryNet

  1. On BinaryNet paper, it says no data augmentation was used, so is it correct that there's only image data [0,255] (int) scaled & shifted to [-1,1] (float) ?

in other words, no crop/brighten/resize etc. ? I don't understand how original CNN (10.96%) and Binarized CNN (11.40%) have same error rate...

MatthieuCourbariaux commented 6 years ago
  1. Yes. Those are just different versions of the same paper. The 2 different error rates correspond to 2 different implementations (1 in Theano, 1 in Torch) of the same method. This git repository contains the Theano implementation. The Torch implementation is available here.

  2. No data augmentation is used. There is only the preprocessed image dataset. If I recall correctly, we do some normalization and ZCA whitening.

wlgns0105 commented 6 years ago

Thank you for the reply