mrgloom / keras-semantic-segmentation-example

Example of semantic segmentation in Keras

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reshaping the mask

jaybo opened this issue · comments

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)

Yes, it should work without reshape.