amanbasu / 3d-prostate-segmentation

Segmentation of prostate from MRI scans
GNU General Public License v3.0
44 stars 13 forks source link

node IteratorGetNext error #4

Closed davidiommi closed 4 years ago

davidiommi commented 5 years ago

Hi, I tried to launch the training, but I got this error:

InvalidArgumentError (see above for traceback): Cannot batch tensors with different shapes in component 0. First element had shape [512,512,29] and element 1 had shape [512,512,54].

 [[node IteratorGetNext (defined at D:/1_Deep_learning/codes/Segmentation_Deep_learing/3d-prostate-segmentation-master/train.py:53) ]]
 [[node IteratorGetNext (defined at D:/1_Deep_learning/codes/Segmentation_Deep_learing/3d-prostate-segmentation-master/train.py:53) ]]

Is it because you are using a different version of tensorflow from mine? I have the 1.13.1 tensorflow gpu

Thanks in advance

amanbasu commented 5 years ago

While reading the MRI scans the number of slices has to be same, it seems that you are reading scans with the different number of slices (29 and 54). Make sure you have modified your data using resizing.py file.