Skip to content

Commit 3b2476e

Browse files
authored
Add files via upload
1 parent 14216a5 commit 3b2476e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

AI/Scripts/extractor.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
awk '/avg/' backup/aiport/train_log_3600.txt | awk '{print $3}' > avg.txt
2+
awk '/avg/' backup/aiport/train_log_3600.txt | awk -F ":" '{print $1}' > epochs.txt
3+
paste -d " " epochs.txt avg.txt > epochavg.txt
4+
5+
rm epochs.txt avg.txt

AI/Scripts/plot.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#import Tkinter
2+
import matplotlib.gridspec as gridspec
3+
import matplotlib.pyplot as plt
4+
import numpy as np
5+
from array import array
6+
from matplotlib import pylab as plt
7+
import pylab
8+
9+
10+
11+
data = np.loadtxt("epochavg.txt",comments="#",delimiter=' ')
12+
13+
epoch, avg, Q_his = array('d'),array('d'),array('d')
14+
#print data
15+
16+
17+
for i in range (0,len(data[:,0])):
18+
epoch.append(data[i,0])
19+
avg.append(data[i,1])
20+
21+
#print(epoch)
22+
23+
24+
#plt.ylim(0.5e-7,2.5e-7)
25+
#plt.yscale("log")
26+
27+
plt.xlabel('Epoch')
28+
plt.ylabel('avg')
29+
plt.grid(True)
30+
plt.plot(epoch, avg, "o-")
31+
plt.show()
32+
33+
34+
35+
36+
37+

0 commit comments

Comments
 (0)