Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
Signed-off-by: Dimitris Karkalousos <d.karkalousos@amsterdamumc.nl>
  • Loading branch information
wdika authored Nov 3, 2024
1 parent c8a144b commit 210bdb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion atommic/collections/segmentation/losses/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ def one_hot(labels: torch.Tensor, num_classes: int, dtype: torch.dtype = torch.f
sh[dim] = num_classes
o = torch.zeros(size=sh, dtype=dtype, device=labels.device)
labels = o.scatter_(dim=dim, index=labels.long(), value=1)
return labels
return labels

0 comments on commit 210bdb4

Please sign in to comment.