hidasib / GRU4Rec

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

Closed ghost closed 5 years ago

ghost commented 6 years ago
  1. For example, in function rmsprop(), suppose sample_idx is None currently , the SharedVariable acc 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 SharedVariable acc be defined first in init() function ?
  2. 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
ghost commented 5 years ago

Resolved.