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.
Same as #32 . That function was not supposed to get into the public version that time, but has been included in the recent update along with other speedups.
https://github.com/hidasib/GRU4Rec/blob/0438f25ce667aa907d3e3b0b159ecda56991a4cb/gru4rec.py#L554
https://github.com/hidasib/GRU4Rec/blob/0438f25ce667aa907d3e3b0b159ecda56991a4cb/gru4rec.py#L564
https://github.com/hidasib/GRU4Rec/blob/0438f25ce667aa907d3e3b0b159ecda56991a4cb/gru4rec.py#L566
The conditional logic of these three lines seems to be unreasonable. Is the branch starting at line 566 redundant?
Also, I did not see the definition of the function
generate_samples
. Thanks.