MrGiovanni / UNetPlusPlus

[IEEE TMI] Official Implementation for UNet++
Other
2.26k stars 538 forks source link

code question #4

Closed shiyanrubing closed 5 years ago

shiyanrubing commented 5 years ago

Hello, I have a problem when using your code: ValueError: The model expects 4 target arrays, but only received one array. Found: array with shape (8, 256, 256, 3). Specifically, the problem will appear if I use " model = Model(input=img_input, output=[nestnet_output_1, nestnet_output_2, nestnet_output_3, nestnet_output_4]) ". The Keras version I use is 2.1.0, and it is based on TensorFlow version 1.10. Look forward to your reply.

mahfuzmohammad commented 5 years ago

model = Model(input=img_input, output=[nestnet_output_1, nestnet_output_2, nestnet_output_3, nestnet_output_4])

Here, you have mentioned the network will have 4 outputs. So while training you need to provide 4 different ground truths. For deep supervision, you can just provide the same ground truth 4 times.

Thanks!