You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import torch
from monai.transforms.utils_pytorch_numpy_unification import max
a = torch.rand(6, 8, 3)
b = max(a, dim=1)
print(type(b), (isinstance(b, tuple)))
print(b.shape)
Return:
<class 'torch.return_types.max'> True
{
"name": "AttributeError",
"message": "'torch.return_types.max' object has no attribute 'shape'",
"stack": "---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[8], line 7
5 b = max(a, dim=1)
6 print(type(b), (isinstance(b, tuple)))
----> 7 print(b.shape)
AttributeError: 'torch.return_types.max' object has no attribute 'shape'"
}
The text was updated successfully, but these errors were encountered:
KumoLiu
added a commit
to KumoLiu/MONAI
that referenced
this issue
Aug 22, 2024
Return:
The text was updated successfully, but these errors were encountered: