ValueError: Error when checking target: expected model_2 to have shape (None, 252, 252, 1) but got array with shape (300, 128, 128, 3)

后端 未结 2 1019
抹茶落季
抹茶落季 2020-11-27 08:33

hi I am building a image classifier for one-class classification in which i\'ve used autoencoder while running this model I am getting this error by this line (autoencoder_m

2条回答
  •  误落风尘
    2020-11-27 09:04

    It's a simple incompatibility between the output shape of the decoder and the shape of your training data. (Target means output).

    I see you've got 2 MaxPoolings (dividing your image size by 4), and three upsamplings (multiplying the decoder's input by 8).

    The final output of the autoencoder is too big and doesn't match your data. You must simply work in the model to make the output shape match your training data.

提交回复
热议问题