mrgloom / keras-semantic-segmentation-example

Example of semantic segmentation in Keras
56 stars 24 forks source link

Reshaping the mask #2

Open jaybo opened 6 years ago

jaybo commented 6 years ago

Sorry for the interruption, but I don't understand why the mask is reshaped in binary_crossentropy_example.py, line 106:

mask_list= mask_list.reshape(batch_size,IMAGE_H*IMAGE_W,NUMBER_OF_CLASSES)

but the image_list is not similarly reshaped. The code works perfectly as is, but I'm just trying to understand why the above line isn't:

mask_list= mask_list.reshape(batch_size,IMAGE_H,IMAGE_W,NUMBER_OF_CLASSES)

mrgloom commented 6 years ago

Yes, it should work without reshape.