BinaryNet.pytorch
BinaryNet.pytorch copied to clipboard
code question about details
In the file main_binary.py line254, there is a attr as 'org' in p. What does it means and when is it assigned? I cannot find any clues from the whole project.
The key idea here is to compute the grad on real weight value. So he uses an intern parameter .org to save the real weight value during the forward pass. When he needs to apply the grad computed with binarized weight on the real weight value, he replaces binarized weight by the real one store on .org parameter.