tensor size mismatched, training custom data with unetr_btcv_segmentation_3d.ipynb #1497
Unanswered
esther1262
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi @esther1262, I think you may have accidentally set the wrong
Hope it helps, thanks! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, My images have dimension 256x256x16, so as the labelmaps. There are 100 images for training and 30 for validation. The labelmaps have 27 labels plus background. I modified some codes in the tutorial to fit my data. I changed some settings in the transformation and UNETR.
After a minute of running, an error popped up that
RuntimeError: The size of tensor a (16) must match the size of tensor b (256) at non-singleton dimension 1
. How can I fix the issue? The error might come fromsliding_window_inference
in the validation but I didnt change anything in that function. Calculating epoch loss didnt have issue. I reran the codes withresized
option in both train and validation transformation, or just in the train_transforms but issues still occurred.Thanks!
Errors:
Beta Was this translation helpful? Give feedback.
All reactions