From 3d417c53cc88110df7d129ce5408d5cf92a7eac5 Mon Sep 17 00:00:00 2001 From: Sanwal Yousaf Date: Sat, 27 Apr 2019 14:19:07 -0400 Subject: [PATCH 1/2] Updated line 438 to open instead of file file function has been deprecated in python 3. To write to a file, you need to use open function. It has the same syntax as file. --- conv_net_train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conv_net_train.py b/conv_net_train.py index 9878d74..94d6b4d 100644 --- a/conv_net_train.py +++ b/conv_net_train.py @@ -435,7 +435,7 @@ def make_idx_data_cv(revs, word_idx_map, mairesse, charged_words, cv, per_attr=0 r = range(0,10) - ofile=file('perf_output_'+str(attr)+'.txt','w') + ofile=open('perf_output_'+str(attr)+'.txt','w') charged_words=[] From 0a0f8572034d37fa310c6e1866d9174923a0accf Mon Sep 17 00:00:00 2001 From: Sanwal Yousaf Date: Sat, 27 Apr 2019 15:57:58 -0400 Subject: [PATCH 2/2] Updated line 16 to line 17 Downsample no longer works with the most updated version of Theano. Pool is an alternative --- conv_net_classes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conv_net_classes.py b/conv_net_classes.py index 4690412..1845466 100644 --- a/conv_net_classes.py +++ b/conv_net_classes.py @@ -13,7 +13,8 @@ import theano.tensor.shared_randomstreams import theano import theano.tensor as T -from theano.tensor.signal import downsample +# from theano.tensor.signal import downsample +from theano.tensor.signal import pool from theano.tensor.nnet import conv def ReLU(x):