We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca521c9 commit 97dce8cCopy full SHA for 97dce8c
segmentation_models_pytorch/losses/_functional.py
@@ -26,7 +26,7 @@ def to_tensor(x, dtype=None) -> torch.Tensor:
26
x = x.type(dtype)
27
return x
28
if isinstance(x, (list, tuple)):
29
- x = np.ndarray(x)
+ x = np.array(x)
30
x = torch.from_numpy(x)
31
if dtype is not None:
32
0 commit comments