Pytorch--3D-Medical-Images-Segmentation--SALMON icon indicating copy to clipboard operation
Pytorch--3D-Medical-Images-Segmentation--SALMON copied to clipboard

Error in feeding input with Batch=4.

Open Almadani92 opened this issue 3 years ago • 0 comments

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?

Almadani92 avatar Mar 27 '22 09:03 Almadani92