Error when checking target: expected dense_3 to have shape (3,) but got array with shape (1,)

后端 未结 9 1777
不思量自难忘°
不思量自难忘° 2020-12-04 17:26

I am working on training a VGG16-like model in Keras, on a 3 classes subset from Places205, and encountered the following error:

ValueError: Error when chec         


        
9条回答
  •  遥遥无期
    2020-12-04 18:10

    Had the same issue. To solve the problem you can simply change in validation_generator and train_generator the class mode from 'binary' to 'categorical' - that's because you have 3 classes-which is not binary.

提交回复
热议问题