Skip to content

RuntimeError: stack expects each tensor to be equal size, but got [1, 128, 224, 224] at entry 0 and [1, 224, 224, 128] at entry 3 #4387

Answered by Nic-Ma
lg2578 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @lg2578 ,

Thanks for your interest here.
I think that because you executed random spatial transform RandRotate90d(keys=["img", "seg"], prob=0.5, spatial_axes=[0, 2]).
It's prob=0.5, so some images are rotated, some not.

Thanks.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lg2578
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants