Skip to content

Commit

Permalink
Fixed data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ZM7 authored Apr 13, 2022
1 parent 68f9ca9 commit ccd032f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions new_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ def generate_user(user, data, graph, item_max_length, user_max_length, train_pat
save_graphs(train_path+ '/' + str(user) + '/'+ str(user) + '_' + str(j) + '.bin', fin_graph,
{'user': torch.tensor([user]), 'target': torch.tensor([target]), 'u_alis':u_alis, 'last_alis': last_alis})
train_num += 1
if j == split_point-1-2:
if j == split_point - 1 - 1:
save_graphs(val_path + '/' + str(user) + '/' + str(user) + '_' + str(j) + '.bin', fin_graph,
{'user': torch.tensor([user]), 'target': torch.tensor([target]), 'u_alis': u_alis,
'last_alis': last_alis})
else:
if j == split_point - 1:
save_graphs(test_path + '/' + str(user) + '/' + str(user) + '_' + str(j) + '.bin', fin_graph,
{'user': torch.tensor([user]), 'target': torch.tensor([target]), 'u_alis':u_alis, 'last_alis': last_alis})
test_num += 1
Expand Down

0 comments on commit ccd032f

Please sign in to comment.