baudcode / tf-semantic-segmentation

Semantic Segmentation using Tensorflow on popular Datasets like Ade20k, Camvid, Coco, PascalVoc
GNU General Public License v3.0
69 stars 14 forks source link

Shape error when training on custom dataset #12

Open FSet89 opened 2 years ago

FSet89 commented 2 years ago

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?

baudcode commented 2 years ago

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

xovobobo commented 2 years ago

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]