May-05-2019, 10:47 AM
It is definitely something wrong with the model. As far as I understood, you have binary classification problem. If you don't need
to extract specific features that accounting neighbor values (e.g. neighbor pixel colors), as it does in case of image segmentation/classification problems (when using, e.g. CNN), you likely don't need to create 2d input layer:
to extract specific features that accounting neighbor values (e.g. neighbor pixel colors), as it does in case of image segmentation/classification problems (when using, e.g. CNN), you likely don't need to create 2d input layer:
input_shape=(5,1980)
; just replace this with input_shape=(5*1980, )
; Further, reshape TrainX (and TestX): TrainX = TrainX.reshape(897, -1)
; Finally, output of the last layer has dim (len(TrainY), 2), so you need to apply keras.utils.to_categorical
to TrainY
, e.g. TrainY = to_categorical(TrainY)
(or you can leave TrainY
as is, but change dense_3 layer to Dense(1, activation="softmax")
.