Keras - Plot training, validation and test set accuracy

前端 未结 4 1688
萌比男神i
萌比男神i 2020-12-07 22:36

I want to plot the output of this simple neural network:

model.compile(loss=\'binary_crossentropy\', optimizer=\'adam\', metrics=[\'accuracy\'])
history = m         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 23:37

    Validate the model on the test data as shown below and then plot the accuracy and loss

    model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
    history = model.fit(X_train, y_train, nb_epoch=10, validation_data=(X_test, y_test), shuffle=True)
    

提交回复
热议问题