baudcode/tf-semantic-segmentation

Shape error when training on custom dataset

FSet89 opened this issue · 2 comments

python3 -m tf_semantic_segmentation.bin.train -m 'unet' -o 'adam' -bs 4 -l 'categorical_crossentropy' -logdir 'logs' -rd 'tfrecord'

tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 174850048 values, but the requested shape has 262144

I created my own dataset using the provided code. Why do I get this error?

What image size did you specify when creating the tfrecord?
Do all of your images have the same size?

same error. images 1920*1080
Input to reshape is a tensor with 8294400 values, but the requested shape has 2073600
[[{{function_node __inference_read_tfrecord_47}}{{node Reshape_1}}]] [Op:IteratorGetNext]