advaitsave / Multiclass-Semantic-Segmentation-CamVid

Tensorflow 2 implementation of complete pipeline for multiclass image semantic segmentation using UNet, SegNet and FCN32 architectures on Cambridge-driving Labeled Video Database (CamVid) dataset.
82 stars 41 forks source link

Trying to reproduce the notebook with Unet model #1

Closed denstern closed 5 years ago

denstern commented 5 years ago

Hello! I got an error at the beginning of training model after getting the following message:

Found 81 images belonging to 1 classes.
Found 81 images belonging to 1 classes.
Epoch 1/100
16/18 [=========================>....] - ETA: 0s - loss: 0.3651 - tversky_loss: 31.2060 - dice_coef: 0.9260 - acc: 0.9066
InvalidArgumentError: 2 root error(s) found.

(0) Invalid argument: Input to reshape is a tensor with 65536 values, but the requested shape has 327680
[[{{node Adam/gradients/conv2d_18/Max_grad/Reshape}}]]

(1) Invalid argument: Input to reshape is a tensor with 65536 values, but the requested shape has 327680
[[{{node Adam/gradients/conv2d_18/Max_grad/Reshape}}]]

[[Adam/gradients/batch_normalization_17/cond_grad/If/then/_468/gradients/zeros_like_1/OptionalGetValue/_819]]

0 successful operations.
0 derived errors ignored. [Op:__inference_keras_scratch_graph_11182]

Nothing was changed in the code besides executing tf.enable_eager_execution() function at the begging on the notebok.

Using tensorflow-gpu 1.14.0

Can you help to resolve this error?

denstern commented 5 years ago

I've resolved the problem just deleting one image in folder for training, i.e. there are now 80 images there.