-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PatchMerging padding error #4696
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
import torch
from monai.networks.nets.swin_unetr import PatchMerging
dim=10
t = PatchMerging(dim)(torch.zeros((1, 21, 20, 20, dim)))
print(t.shape)Traceback (most recent call last):
File "my_test_3.py", line 7, in <module>
t = PatchMerging(dim)(torch.zeros((1, 21, 20, 20, dim)))
File "py38/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "MONAI/monai/networks/nets/swin_unetr.py", line 701, in forward
x = torch.cat([x0, x1, x2, x3, x4, x5, x6, x7], -1)
RuntimeError: Sizes of tensors must match except in dimension 4. Expected size 11 but got size 10 for tensor number 1 in the list.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working