Skip to content

Commit

Permalink
Update rec_dataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yimutianyang authored Aug 7, 2023
1 parent 73c0c97 commit d32e780
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rec_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, args):
self.traindata = np.load(self.data_path + 'traindata.npy', allow_pickle=True).tolist()
self.testdata = np.load(self.data_path + 'testdata.npy', allow_pickle=True).tolist()
self.num_user, self.num_item = self.max_user_and_item()
pdb.set_trace()
#pdb.set_trace()
self.num_node = self.num_user + self.num_item
self.training_user, self.training_item = [], []
for u, items in self.traindata.items():
Expand Down Expand Up @@ -203,4 +203,4 @@ def _batch_sampling(self, num_negative):
if index_end == len(indexs):
index_start = len(indexs) - self.batch_size
batch_data = triplet_data[indexs[index_start:index_end]]
yield batch_data[:, 0], batch_data[:, 1], batch_data[:, 2]
yield batch_data[:, 0], batch_data[:, 1], batch_data[:, 2]

0 comments on commit d32e780

Please sign in to comment.