GRU4REC-pytorch
GRU4REC-pytorch copied to clipboard
question about mask in data_loader
Hi, I have a question about the "mask" in DataLoader(),
for i in range(minlen - 1):
idx_input = idx_target
idx_target = df.item_idx.values[start + i + 1]
input = torch.LongTensor(idx_input)
target = torch.LongTensor(idx_target)
yield input, target, mask
'mask' is all the same during the for loop, but I think it should be reset to [] after the first loop. Otherwise, the reset_hidden() will always reset the hidden state. Could you check it, Thank you!
@HAN-Yuqiang thank you for your question. Currently, I am very busy at my company, so I have no time to check your issue right now :( I will try to check it as soon as possible. Sorry about that :(
Hi, I have a question about the "mask" in DataLoader(),
for i in range(minlen - 1): idx_input = idx_target idx_target = df.item_idx.values[start + i + 1] input = torch.LongTensor(idx_input) target = torch.LongTensor(idx_target) yield input, target, mask
'mask' is all the same during the for loop, but I think it should be reset to [] after the first loop. Otherwise, the reset_hidden() will always reset the hidden state. Could you check it, Thank you!
@HAN-Yuqiang You mean mask reset after yield
statement, Right ?
Hi, I have a question about the "mask" in DataLoader(),
for i in range(minlen - 1): idx_input = idx_target idx_target = df.item_idx.values[start + i + 1] input = torch.LongTensor(idx_input) target = torch.LongTensor(idx_target) yield input, target, mask
'mask' is all the same during the for loop, but I think it should be reset to [] after the first loop. Otherwise, the reset_hidden() will always reset the hidden state. Could you check it, Thank you!
@HAN-Yuqiang You mean mask reset after
yield
statement, Right ?
Yes, I think it should be that.