allenai / allenai/XNOR-Net

Questions about the updateBinaryGradWeight function

Aperta
#9 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Lua
Stelle
872
Fork
235
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi, thanks for your excellent work. I am reading your code for a better understanding of the paper and I have two questions about the updateBinaryGradWeight function.
I guess this function deals with the formula of “∂C/∂Wi = ∂C/∂W'i_(1/n+((∂sign/∂Wi)_alpha))" in the third paragraph on page 6. I can match the code with this formula except the "1-1/s[2]". What does it mean?
To figure out this question I write a test and now I have anther problem unfortunately : ). Here is my code and the result.

local x = torch.Tensor(2,1):fill(1);
local y = x:expand(2,10);
y:add(1);
print(y)

11 11 11 11 11 11 11 11 11 11
11 11 11 11 11 11 11 11 11 11
[torch.DoubleTensor of size 2x10]

It seems like there may be something wrong when I use add() or mul() after expand(). Is there anything wrong with the way I understand the code?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.