Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Error in feeding input with Batch=4. #10

Open
Almadani92 opened this issue Mar 27, 2022 · 0 comments
Open

Error in feeding input with Batch=4. #10

Almadani92 opened this issue Mar 27, 2022 · 0 comments

Comments

@Almadani92
Copy link

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 Almadani92 changed the title Error in feeding input with Batch=4 to the network. Error in feeding input with Batch=4. Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant