Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reader.py #239

Merged
merged 14 commits into from
Oct 28, 2020
Prev Previous commit
Next Next commit
Update reader.py
  • Loading branch information
Qdriving authored Sep 28, 2020
commit 5f7ffbc2d6bc233539414e58e687f33d71889a55
4 changes: 2 additions & 2 deletions models/rank/dien/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def make_data(self, b):
else:
len_seq = len(b[i][0])
start_idx = random.randint(0, self.max_neg_item - len_seq - 1)
self.neg_candidate_item[start_idx:start_idx + len_seq +1] = b[
self.neg_candidate_item[start_idx:start_idx + len_seq + 1] = b[
i][0]
self.neg_candidate_cat[start_idx:start_idx + len_seq +1] = b[
self.neg_candidate_cat[start_idx:start_idx + len_seq + 1] = b[
i][1]

for _ in range(len(b[i][0])):
Expand Down