-
Notifications
You must be signed in to change notification settings - Fork 46
Description
输出x的shape: torch.Size([1, 1, 304, 224, 112])
输出y的shape: torch.Size([1, 1, 304, 224, 112])
输出model_in的shape: torch.Size([1, 2, 304, 224, 112])
Traceback (most recent call last):
File "/home/yuanpeng/Registration/Vit/ViT-V-Net/train.py", line 171, in
main()
File "/home/yuanpeng/Registration/Vit/ViT-V-Net/train.py", line 94, in main
model_out = model(model_in)
File "/home/yuanpeng/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/yuanpeng/Registration/Vit/ViT-V-Net/models.py", line 425, in forward
x = self.decoder(x, features)
File "/home/yuanpeng/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/yuanpeng/Registration/Vit/ViT-V-Net/models.py", line 295, in forward
x = decoder_block(x, skip=skip)
File "/home/yuanpeng/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/home/yuanpeng/Registration/Vit/ViT-V-Net/models.py", line 254, in forward
x = torch.cat([x, skip], dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 18 but got size 19 for tensor number 1 in the list.
输出x的shape: torch.Size([1, 512, 18, 14, 6])
输出skip的shape: torch.Size([1, 32, 19, 14, 7])
Process finished with exit code 1
Excuse me, the size of the image I input is 304, 224, 112, and an error is reported. Do you have any requirements for the size of the input image?