Skip to content

Commit

Permalink
rollback getitem
Browse files Browse the repository at this point in the history
  • Loading branch information
namsaraeva committed May 17, 2024
1 parent 2e14ebb commit 56260ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sparcscore/ml/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ def __getitem__(self, idx):

if self.return_id:
ids = int(data_item[3])
sample = (t, torch.tensor(target), torch.tensor(ids)) # return data, target, and id
sample = (t, target, torch.tensor(ids)) # return data, target, and id
elif self.return_fake_id:
sample = (t, torch.tensor(target), torch.tensor(0)) # return data, target, and fake id
sample = (t, target, torch.tensor(0)) # return data, target, and fake id
else:
sample = (t, torch.tensor(target)) # return data and target
sample = (t, target) # return data and target

return sample

0 comments on commit 56260ac

Please sign in to comment.