# -*- coding=utf-8 -*-'''import matplotlib.pyplot as pltimport relogs=open('loss').read()#print logspattern = re.compile('\.*?Iteration (\d+)\, loss = (.*?)\n',re.S)result= re.findall(pattern,logs)print len(result)#end to endimg={}c=0iteration=[]loss=[]iteration=[]loss=[]for i in xrange(0,70000/20): iteration.append(result[i][0]) loss.append(result[i][1]) colors = 'navy'plt.clf()plt.plot(iteration, loss, lw=1, color=colors)plt.xlabel('iteration')plt.ylabel('loss')plt.xlim([0.0, 70000.0])plt.ylim([0.0, 1.5])plt.title('End to end')#plt.legend(loc="lower left")plt.show()