ValueError: Error when checking target: expected dense_2 to have 3 dimensions, but got array with shape (10000, 1)

前端 未结 1 629
不知归路
不知归路 2021-01-19 17:36

I am using keras MLP network for binary classification of 3-D word vector input_shape=(None,24,73). I have used two dense layers dense_1 and

相关标签:
1条回答
  • 2021-01-19 18:17

    Since you have a binary_classification task your last layer should look something like this

    model.add(Dense(1, activation='sigmoid'))
    

    Right now you model is out puting 3D array which don't match the shape of your target (2D)

    0 讨论(0)
提交回复
热议问题