From 79d6e6c62d72a102b218a26bb70593f379f6a55a Mon Sep 17 00:00:00 2001 From: Maigo Date: Wed, 7 Dec 2016 20:05:36 -0500 Subject: [PATCH 1/3] Fix parsing of batch_size --- cmds/run_Extract_Feats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/run_Extract_Feats.py b/cmds/run_Extract_Feats.py index 706908a..b8d5bcc 100755 --- a/cmds/run_Extract_Feats.py +++ b/cmds/run_Extract_Feats.py @@ -52,7 +52,7 @@ nnet_cfg = arguments['nnet_cfg'] output_file = arguments['output_file'] layer_index = int(arguments['layer_index']) - batch_size = float(arguments['batch_size']) + batch_size = int(arguments['batch_size']) argmax = arguments.has_key('argmax') and string2bool(arguments['argmax']) # load network configuration and set up the model From a50909a24d8069800f20400438bfe9bc5ceaf95c Mon Sep 17 00:00:00 2001 From: oalsing Date: Thu, 4 May 2017 10:44:12 +0200 Subject: [PATCH 2/3] Updates Theano 0.0.0 Downsample to Pool --- layers/conv.py | 4 ++-- models/cnn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/conv.py b/layers/conv.py index ae37efe..98d11eb 100755 --- a/layers/conv.py +++ b/layers/conv.py @@ -23,7 +23,7 @@ import theano import theano.tensor as T -from theano.tensor.signal import downsample +from theano.tensor.signal import pool from theano.tensor.nnet import conv class ConvLayer(object): @@ -174,7 +174,7 @@ def __init__(self, numpy_rng=None, input = None, filter_shape=(2, 1, 5, 5), y_out = activation(conv_out + self.b.dimshuffle('x', 0, 'x', 'x')) # downsample each feature map individually, using maxpooling - self.output = downsample.max_pool_2d(input=y_out, + self.output = pool.pool_2d(input=y_out, ds=poolsize, ignore_border=True) if self.flatten: self.output = self.output.flatten(2) diff --git a/models/cnn.py b/models/cnn.py index b09a8f8..b82d280 100755 --- a/models/cnn.py +++ b/models/cnn.py @@ -25,7 +25,7 @@ import theano import theano.tensor as T -from theano.tensor.signal import downsample +from theano.tensor.signal import pool from theano.tensor.nnet import conv from layers.logistic_sgd import LogisticRegression From bb5b96004bc5f410d931dd07aaa27c0540bcac07 Mon Sep 17 00:00:00 2001 From: oalsing Date: Thu, 4 May 2017 10:44:12 +0200 Subject: [PATCH 3/3] Updates Theano 0.8.0 Downsample to Pool --- layers/conv.py | 4 ++-- models/cnn.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/conv.py b/layers/conv.py index ae37efe..98d11eb 100755 --- a/layers/conv.py +++ b/layers/conv.py @@ -23,7 +23,7 @@ import theano import theano.tensor as T -from theano.tensor.signal import downsample +from theano.tensor.signal import pool from theano.tensor.nnet import conv class ConvLayer(object): @@ -174,7 +174,7 @@ def __init__(self, numpy_rng=None, input = None, filter_shape=(2, 1, 5, 5), y_out = activation(conv_out + self.b.dimshuffle('x', 0, 'x', 'x')) # downsample each feature map individually, using maxpooling - self.output = downsample.max_pool_2d(input=y_out, + self.output = pool.pool_2d(input=y_out, ds=poolsize, ignore_border=True) if self.flatten: self.output = self.output.flatten(2) diff --git a/models/cnn.py b/models/cnn.py index b09a8f8..b82d280 100755 --- a/models/cnn.py +++ b/models/cnn.py @@ -25,7 +25,7 @@ import theano import theano.tensor as T -from theano.tensor.signal import downsample +from theano.tensor.signal import pool from theano.tensor.nnet import conv from layers.logistic_sgd import LogisticRegression