Fix multiple graphs and plot while evaluating

This commit is contained in:
reedts 2018-08-13 18:54:34 +02:00
parent 525298f761
commit 173d5762bc

View file

@ -54,15 +54,21 @@ if TRAIN:
pp.plot(pred_result, 'black')
pp.plot(prediction, color=color_gradient_base)
pp.savefig(FIGURE_OUTPUT_DIR+'{}.pdf'.format(q), orientation='landscape')
color_gradient_base = tuple([sum(x) for x in zip(color_gradient_base, color_step_width)])
for i in range(NUM_QUERIES):
pp.figure(i)
pp.savefig(FIGURE_OUTPUT_DIR+'{}.pdf'.format(i), orientation='landscape')
pp.close(i)
if PLOT:
# Plot training success rate (with 'average loss')
pywatts.routines.plot_training(train_eval)
loss = []
for e in train_eval:
loss.append(e['average_loss'])
pp.plot(loss)
# Needed for execution in PyCharm
pp.show()
exit()