DeepLearningExamples icon indicating copy to clipboard operation
DeepLearningExamples copied to clipboard

[TensorFlow/Unet_3D_Medical] Input to reshape problem, train mode

Open camposmiguel opened this issue 2 years ago • 4 comments

I'm using the Unet_3D_Medical and I had to change some parameters to reach my goal but I'm having trouble to find where to change the expected output of the network. I searched all files but didn't find where to change it. The error says "Input to reshape is a tensor with 614400 values, but the requested shape has 8928000" and happens only in the "train mode".

camposmiguel avatar Oct 31 '22 12:10 camposmiguel

Hello @camposmiguel. You'll have to be more specific about what you've changed and what you are trying to do. The network is tuned to work with BraTS dataset and uses crops of 128x128x128 for training and 224x224x160 for evaluation. Did you change any of these shapes?

mmarcinkiewicz avatar Oct 31 '22 22:10 mmarcinkiewicz

Hi @mmarcinkiewicz thank you for answering and sorry for the lack of information. Yes, I changed the shape. I'm trying to adapt the network to use a dataset that uses images 320x320x6 and I did it using "python main.py --exec_mode train --benchmark --data_dir /data/OutSacro/ --model_dir /results/result --batch_size 2 --input_shape 320 320 6" because I searched all files and couldn't find where to change the input shape inside them. But it works in the "debug_train" mode.

camposmiguel avatar Nov 03 '22 13:11 camposmiguel

Is 320 320 6 a typo and it should be 320x320x320x6 (6 input channels)?

mmarcinkiewicz avatar Nov 03 '22 15:11 mmarcinkiewicz

I tried o use 320x320x320x6 but it didn't work as well. I thought that the last number were the images that I have in every study. My studies are composed by 6 images that are 320 pixels of height by 320 pixels of width and I didn't understand what this fourth dimension is. Is it wrong?

camposmiguel avatar Nov 03 '22 20:11 camposmiguel