Closed bhralzz closed 4 years ago
Hi @harrislin2018,
As mentioned in the resizing.py file, did you make the below changes before executing it?
new_size = [144,144,50]
interp = sitk.sitkNearestNeighbour # for labels
# interp = sitk.sitkLinear # for input features
for file in sorted(glob.glob('train/Case*_segmentation.mhd')):
# uncomment when resizing input images
# file = file.replace('_segmentation', '')
img = sitk.ReadImage(file)
reshaped = resample(img, new_size, interp)
sitk.WriteImage(reshaped, file)
print(file, end='\r')
Also, I can see that the error is on line 268 of train.py
tf.summary.image('labels', labels[:, :, :, 32:33, 0], max_outputs=2,collections=['val'])
Please ensure that the shape of input image and labels are appropriate before proceeding.
Stacktrace:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 2073600 values, but the requested shape requires a multiple of 1048576
[[node Reshape_1 (defined at /Desktop/DataScience/VNet/3d-prostate-segmentation-master/train.py:268) ]]
Please guide how to reproduce results step by step, such as : where to place dataset, the order of file running and so on. tnx for your help