keras-semantic-segmentation-example icon indicating copy to clipboard operation
keras-semantic-segmentation-example copied to clipboard

Reshaping the mask

Open jaybo opened this issue 7 years ago • 1 comments
trafficstars

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)

jaybo avatar Jul 23 '18 04:07 jaybo

Yes, it should work without reshape.

mrgloom avatar Jul 29 '18 22:07 mrgloom