Skip to content

Commit

Permalink
y
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored May 5, 2021
1 parent 1702089 commit 207af49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchmetrics/utilities/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def dim_zero_cat(x: Union[Tensor, List[Tensor]]) -> Tensor:
x = x if isinstance(x, (list, tuple)) else [x]
x = [xx.unsqueeze(0) if xx.numel() == 1 and xx.ndim == 0 else xx for xx in x]
x = [y.unsqueeze(0) if y.numel() == 1 and y.ndim == 0 else y for y in x]
return torch.cat(x, dim=0)


Expand Down

0 comments on commit 207af49

Please sign in to comment.