title: plot loss and accuracy of a model in keras
body: <p>i have a function to build a model in keras such as below:</p>
  
  <pre><code>def build_model(lr = 0.0):
      inp = Input(shape = (max_len,))
      x = Embedding_layer
      y = LSTM_layer(x)
      y = Convolution_layer(y)
      x = GlobalMaxPooling1D(y)
  
      x = Dense(3, activation = "sigmoid")(x)
      model = Model(inputs = inp, outputs = x)
      model.compile(loss = "binary_crossentropy", optimizer = Adam(), metrics = ["accuracy"])
      history = model.fit(X_train, Y_train, batch_size = 256, epochs = 3, 
                          verbose = 1, callbacks = [ra_val, check_point, early_stop])
      model = load_model(file_path)
      return model
  
  model = build_model(lr = 1e-3)
  </code></pre>
  
  <p>and now i want to plot history loss and accuracy after training phase, but model doesn't have history option.</p>
  
  <p>how can i plot loss and accuracy ?</p>