GRU4Rec is the original Theano implementation of the algorithm in "Session-based Recommendations with Recurrent Neural Networks" paper, published at ICLR 2016 and its follow-up "Recurrent Neural Networks with Top-k Gains for Session-based Recommendations". The code is optimized for execution on the GPU.
Other
747
stars
222
forks
source link
Questions about the implementation of optimizers #25
For example, in function rmsprop(), suppose sample_idx is None currently , the SharedVariableacc is defined first, followed by acc_new, then set updates[acc] = acc_new, but when calling RMSprop() next time which is not rmsprop(), for a same parameter, in function rmsprop() which is called by RMSprop(), the acc is reset first, then acc_new is computed. Shouldn't SharedVariableacc be defined first in init() function ?
Why using self.lmbd in parameter updating? Like line 387 in file gru4rec.py.
updates[p] = p * np.float32(1.0 - self.learning_rate * self.lmbd) - np.float32(self.learning_rate) * g
rmsprop()
, supposesample_idx is None
currently , the SharedVariableacc
is defined first, followed byacc_new
, then setupdates[acc] = acc_new
, but when callingRMSprop()
next time which is notrmsprop()
, for a same parameter, in functionrmsprop()
which is called byRMSprop()
, theacc
is reset first, thenacc_new
is computed. Shouldn't SharedVariableacc
be defined first ininit()
function ?self.lmbd
in parameter updating? Like line 387 in file gru4rec.py.updates[p] = p * np.float32(1.0 - self.learning_rate * self.lmbd) - np.float32(self.learning_rate) * g