MAPE_, RMSE_ = sess.run([g.MAPE, g.RMSE], feed_dict={ g.x: training_X, g.y: training_Y }) print('Tr_MAPE:' + str(MAPE_) + ', Tr_RMSE:' + str(RMSE_)) # tensorboard: summary = sess.run(g.merged, feed_dict={ g.x: training_X, g.y: training_Y }) writer.add_summary(summary, step) step += 1 g.is_training = False prediction, t_MAPE_, t_RMSE_ = sess.run([g.pred, g.MAPE, g.RMSE], feed_dict={ g.x: testing_X, g.y: testing_Y }) print('Te_MAPE:' + str(t_MAPE_) + ', Te_RMSE:' + str(t_RMSE_)) # save prediction to a file pdata.prediction_to_csv(prediction, 'C_main') tEnd = time.time() print("It cost %f sec" % (tEnd - tStart))