crslab.model.recommendation.gru4rec package¶
Submodules¶
GRU4REC¶
References
Hidasi, Balázs, et al. “Session-Based Recommendations with Recurrent Neural Networks.” in ICLR 2016.
-
class
crslab.model.recommendation.gru4rec.gru4rec.
GRU4RECModel
(opt, device, vocab, side_data)[source]¶ Bases:
crslab.model.base.BaseModel
-
item_size
¶ A integer indicating the number of items.
A integer indicating the hidden state size in GRU.
-
num_layers
¶ A integer indicating the number of GRU layers.
A float indicating the dropout rate to dropout hidden state.
-
dropout_input
¶ A integer indicating if we dropout the input of model.
-
embedding_dim
¶ A integer indicating the dimension of item embedding.
-
batch_size
¶ A integer indicating the batch size.
- Parameters
opt (dict) – A dictionary record the hyper parameters.
device (torch.device) – A variable indicating which device to place the data and model.
vocab (dict) – A dictionary record the vocabulary information.
side_data (dict) – A dictionary record the side data.
-