When using the code and feed the input image with size [4,1,256,256,16] (which the number 4 in the first dimension is the batch size), I am having the following error:
.local/lib/python3.9/site-packages/monai/networks/blocks/dynunet_block.py", line 216, in forward
out = torch.cat((out, skip), dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 10 but got size 9 for tensor number 1 in the list.
However, when I use the batch size equal to 1 the code works, but the loss is not decreasing.
My question is that how I can feed the input with batch size equal to 4 without getting this error?
When using the code and feed the input image with size [4,1,256,256,16] (which the number 4 in the first dimension is the batch size), I am having the following error: .local/lib/python3.9/site-packages/monai/networks/blocks/dynunet_block.py", line 216, in forward out = torch.cat((out, skip), dim=1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 10 but got size 9 for tensor number 1 in the list.
However, when I use the batch size equal to 1 the code works, but the loss is not decreasing.
My question is that how I can feed the input with batch size equal to 4 without getting this error?