Skip to content

Commit

Permalink
[HOTFIX] Convert target to Tensor in ClassificationDataset (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoSaverioZuppichini authored Sep 22, 2021
1 parent f46cc8e commit b4379bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion darwin/torch/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_target(self, index: int):
idx = self.classes.index(tag)
target[idx] = 1
else:
target = self.classes.index(tags[0])
target = torch.tensor([self.classes.index(tags[0])])

return target

Expand Down

0 comments on commit b4379bd

Please sign in to comment.