You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried forcing my images to [1, 1, 40 * SCALE, 96 * SCALE, 96 * SCALE], but I get an error in the forward() of UNet2ChunkyMiddle at this line: x = torch.cat([x, skips[depth]], 1)
Sizes of tensors must match except in dimension 1. Expected size 6 but got size 1 for tensor number 1 in the list.
Hi! This is a great issue. The class UNet2ChunkyMiddle is from the paper ICON, before we were really aspiring to generalize to arbitrary images. Specifically, it only works if the input is a specific size, that specific size is not documented, and is missing any check that its input is that size. The short term fix is to just switch to UNet2, which is used for all stages in the GradICON and uniGradICON papers. The class UNet2 (which you can get an instance of with reasonable defaults by calling icon_registration.networks.tallUNet2(dimension=3) ) is fully parametric over input size and so won't have this error. Long term, the next update of icon needs to add the asserts for the input shape of UNet2ChunkyMiddle (and possibly deprecate it entirely)
What are the input shape requirements for the images passed to the network?
I'm referring to this function, where te shape is fixed. I want to use my own data for training, but I cannot figure out what the shape has to be
(from lncc_train_knees.py)
I tried forcing my images to
[1, 1, 40 * SCALE, 96 * SCALE, 96 * SCALE]
, but I get an error in theforward()
ofUNet2ChunkyMiddle
at this line:x = torch.cat([x, skips[depth]], 1)
Sizes of tensors must match except in dimension 1. Expected size 6 but got size 1 for tensor number 1 in the list.
those are the shapes:
The text was updated successfully, but these errors were encountered: