title: How to save trained FCN model and test new image on trained FCN model?
body: <p>I am using this code to train FCN, I have succssfully run this code. However, I want to test new images on this trained model, can anyone help me?</p>
  
  <pre class="lang-py prettyprint-override"><code>#Training
  
  from keras import optimizers
  
  sgd = optimizers.SGD(lr=1E-2, decay=5**(-4), momentum=0.9, nesterov=True)
  model.compile(loss='categorical_crossentropy',
  optimizer=sgd,
  metrics=['accuracy'])
  
  hist1 = model.fit(X_train,y_train,
  validation_data=(X_test,y_test),
  batch_size=2,epochs=20,verbose=1)
  
  for key in ['loss', 'acc', 'val_loss', 'val_acc']:
  plt.plot(hist1.history[key],label=key)
  plt.legend()
  plt.show()
  
  
  y_pred = model.predict(X_test)
  y_predi = np.argmax(y_pred, axis=3)
  y_testi = np.argmax(y_test, axis=3)
  print(y_testi.shape,y_predi.shape)
  </code></pre>