trainData.shape = (25000, 700, 50) , Shape as follows:
[[[ 0.7095 0.863 0.712 ... 0.02715 -1.305 0.5195 ]
[-0.66 1.715 -1.934 ... 0.5684 0.754 0.2593 ]
[-0.3533 2.256 -1.292 ... -0.2708 0.6714 -1.128 ]
...
[ 0. 0. 0. ... 0. 0. 0. ]
[ 0. 0. 0. ... 0. 0. 0. ]
[ 0. 0. 0. ... 0. 0. 0. ]]
...
trainLabel.shape = (25000,) , , Shape as follows:
[1. 1. 1. ... 0. 0. 0.]
Using them to train MLP models, How should I reshape trainData and trainLabel ? The detailed code is as follows:
def MySimpleMLP(feature=700, vec_size=50):
auc_roc = LSTM.as_keras_metric(tf.compat.v1.metrics.auc)
model = Sequential()
model.add(Dense(32, activation='relu', input_shape=(feature * vec_size,)))
model.add(Dropout(0.2))
model.add(Dense(32, activation='relu'))
model.add(Dropout(0.2))
model.add(Dense(1, activation='softmax'))
model.compile(loss="binary_crossentropy", optimizer="adam", metrics=[auc_roc])
return model
......
model.fit(trainData, trainLabel, validation_split=0.2, epochs=10, batch_size=64, verbose=2)
help,please.