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

no backward pass?

Open etienne87 opened this issue 7 years ago • 2 comments

i'm printing the weights of the network and they are not changing. It makes sense since all the binarization is happening only on the data (not in the graph, so weight will not update)

how can this code trains a networks for scratch with binarization?

etienne87 avatar Jul 05 '18 10:07 etienne87

I think you are right. we can see that the network learns because the batchnorm parameters do change. But that, of course, is not enough to reach high accuracies....

jafermarq avatar Sep 21 '18 15:09 jafermarq

In the file main_binary.py line 252, there is the loss.backward(). I think the backward pass has already done! Also, are you really sure that the weights are not changing? Maybe you should try a higher leaning rate to make sure the code is ok. I think the gradient may be too small to change the signs of the weights. @etienne87 @jafermarq @itayhubara

appleleaves avatar Jan 11 '19 09:01 appleleaves