Keras in the construction of neural network model and training neural network, simple and useful, summed up a few Keras API use, continuous updating. Of course, you can also learn through the Keras website. Visualization of https://keras.io/models
Save the model map as a picture.
From keras.utils import Plot_model
Plot_model (model, to_file= ' model.png ')
Plot_model receives two optional parameters:
Show_shapes: Specifies whether to display the shape of the output data, default to False
Show_layer_names: Specifies whether to display the layer name, which is true by default
visualization of the training process
history = Model.fit (Xtr_more, Ytr_more, Batch_size=batch_size, epochs=50, verbose=1, Callbacks=[earlystopping, Mcp_save, Reduce_lr_loss], validation_split=0.25) print (History.history.keys ()) FIG =
Plt.figure () Plt.plot (history.history[' acc ') plt.plot (history.history[' VAL_ACC ']) plt.title (' model accuracy ') Plt.ylabel (' accuracy ') plt.xlabel (' epoch ') plt.legend ([' Train ', ' Test '], loc= ' upper left ') Plt.plot (history.history[
' Loss ']) plt.plot (history.history[' Val_loss ') plt.title (' model loss ') Plt.ylabel (' loss ') Plt.xlabel (' epoch ') Plt.legend ([' Train ', ' Test '], loc= ' lower left ') # fig.savefig (' performance.png ')