From 146eb2a3680658cca971d2aa3c3f1ab1471075b0 Mon Sep 17 00:00:00 2001 From: Frederic Bastien Date: Wed, 9 Mar 2016 09:27:38 -0500 Subject: [PATCH 1/4] Don't be too much version when downloading. Make buildbot output smaller --- data/download.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/download.sh b/data/download.sh index ed273bbb..160b0986 100755 --- a/data/download.sh +++ b/data/download.sh @@ -5,7 +5,7 @@ WGET=$? which curl >/dev/null 2>&1 CURL=$? if [ "$WGET" -eq 0 ]; then - DL_CMD="wget -c" + DL_CMD="wget --no-verbose -c" elif [ "$CURL" -eq 0 ]; then DL_CMD="curl -C - -O" else From 57a80fd2bb51b171b81db05cbd33bcfaf68e322f Mon Sep 17 00:00:00 2001 From: Frederic Bastien Date: Wed, 9 Mar 2016 09:27:59 -0500 Subject: [PATCH 2/4] Give name to theano function --- code/rbm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/rbm.py b/code/rbm.py index 901b5870..3800cca7 100644 --- a/code/rbm.py +++ b/code/rbm.py @@ -257,7 +257,8 @@ def get_cost_updates(self, lr=0.1, persistent=None, k=1): # chain_start is the initial state corresponding to the # 6th output outputs_info=[None, None, None, None, None, chain_start], - n_steps=k + n_steps=k, + name="gibbs_hvh" ) # start-snippet-3 # determine gradients on RBM parameters @@ -496,7 +497,8 @@ def test_rbm(learning_rate=0.1, training_epochs=15, ) = theano.scan( rbm.gibbs_vhv, outputs_info=[None, None, None, None, None, persistent_vis_chain], - n_steps=plot_every + n_steps=plot_every, + name="gibbs_vhv" ) # add to updates the shared variable that takes care of our persistent From ff6939b7bcdb70c7acbd9ed4020eacbb0a65c6d0 Mon Sep 17 00:00:00 2001 From: Frederic Bastien Date: Tue, 22 Mar 2016 11:05:15 -0400 Subject: [PATCH 3/4] Finish passing to new conv2d interface --- code/convolutional_mlp.py | 2 +- doc/lenet.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/convolutional_mlp.py b/code/convolutional_mlp.py index a8811bc1..62845c99 100644 --- a/code/convolutional_mlp.py +++ b/code/convolutional_mlp.py @@ -94,7 +94,7 @@ def __init__(self, rng, input, filter_shape, image_shape, poolsize=(2, 2)): input=input, filters=self.W, filter_shape=filter_shape, - image_shape=image_shape + input_shape=image_shape ) # downsample each feature map individually, using maxpooling diff --git a/doc/lenet.txt b/doc/lenet.txt index 117dfdab..76614106 100644 --- a/doc/lenet.txt +++ b/doc/lenet.txt @@ -196,7 +196,7 @@ one of Figure 1. The input consists of 3 features maps (an RGB color image) of s import theano from theano import tensor as T - from theano.tensor.nnet import conv + from theano.tensor.nnet import conv2d import numpy @@ -226,7 +226,7 @@ one of Figure 1. The input consists of 3 features maps (an RGB color image) of s dtype=input.dtype), name ='b') # build symbolic expression that computes the convolution of input with filters in w - conv_out = conv.conv2d(input, W) + conv_out = conv2d(input, W) # build symbolic expression to add bias and apply activation function, i.e. produce neural net layer output # A few words on ``dimshuffle`` : @@ -404,7 +404,7 @@ to be compatible with our previous MLP implementation. Note that the term "convolution" could corresponds to different mathematical operations: 1. `theano.tensor.nnet.conv2d - `_, + `_, which is the most common one in almost all of the recent published convolutional models. In this operation, each output feature map is connected to each From ee5c0cb9a5e873d51c25dc60203e828dd1793889 Mon Sep 17 00:00:00 2001 From: Frederic Bastien Date: Tue, 22 Mar 2016 11:07:09 -0400 Subject: [PATCH 4/4] Use the new Interface --- code/DBN.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/DBN.py b/code/DBN.py index b8e35fad..6ca88603 100644 --- a/code/DBN.py +++ b/code/DBN.py @@ -174,7 +174,7 @@ def pretraining_functions(self, train_set_x, batch_size, k): # compile the theano function fn = theano.function( - inputs=[index, theano.Param(learning_rate, default=0.1)], + inputs=[index, theano.In(learning_rate, value=0.1)], outputs=cost, updates=updates, givens={