Skip to content

Commit 2140abe

Browse files
committed
minor updates
1 parent f5bff87 commit 2140abe

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Some fairly standalone python scripts
1111

1212
* tinisDummyProgram: a demo program for tinisMultiRun
1313

14-
* results: code for managing results of long neural network training runs
14+
* results: code for managing results of long neural network training runs

oncampus.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
# draw : whetheer it would be a good idea to try to plot graphs to the screen. This will be false if you are offcampus or are using SSH without X forwarding
55
import os, subprocess, string
66

7-
if "SSH_CLIENT" in os.environ:
7+
if "STY" in os.environ or "TMUX" in os.environ: #we are inside gnu screen or tmux
8+
#It's not obvious what behaviour is correct in this case - same session can be used in multiple places.
9+
#Simplest is to treat this as off campus.
10+
#When on campus just do graphing in another terminal.
11+
oncampus = False
12+
elif "SSH_CLIENT" in os.environ:
813
oncampus = -1 < subprocess.check_output(["who", "-m"]).find(b"warwick")
914
else:
1015
oncampus = True

results/results.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,14 @@ def v(name, t, ismin):
247247
#we could take more care of nans here
248248
r = lambda x : round(x,4) if x is not None else "NAN?"
249249
return (name,r(m(t)),r(ar(t)/(len(a)-1.0)),r(m(t[:len(a)//2])))
250+
teo_=replaceSeriesWithMovingAverage_(teo,movingAvgLength,True)
251+
tea_=replaceSeriesWithMovingAverage_(tea,movingAvgLength,False)
250252
d=[v("trainObj",tro,1),
251253
v("trainAcc",tra,0),
252254
v( "testObj",teo,1),
253-
v( "testAcc",tea,0)]
255+
v( "testAcc",tea,0),
256+
v( "testObj_Avg",teo_,1),
257+
v( "testAcc_Avg",tea_,0)]
254258
print (tabulate.tabulate(d, headers=("","best","bestIsWhere","firstHalf")))
255259

256260
#could provide more here

0 commit comments

Comments
 (0)