@@ -7,7 +7,7 @@ Convolutional Neural Networks (LeNet)
7
7
This section assumes the reader has already read through :doc:`logreg` and
8
8
:doc:`mlp`. Additionally, it uses the following new Theano functions and concepts:
9
9
`T.tanh`_, `shared variables`_, `basic arithmetic ops`_, `T.grad`_,
10
- `floatX`_, `downsample `_ , `conv2d`_, `dimshuffle`_. If you intend to run the
10
+ `floatX`_, `pool `_ , `conv2d`_, `dimshuffle`_. If you intend to run the
11
11
code on GPU also read `GPU`_.
12
12
13
13
To run this example on a GPU, you need a good GPU. It needs
@@ -35,7 +35,7 @@ Convolutional Neural Networks (LeNet)
35
35
36
36
.. _GPU: http://deeplearning.net/software/theano/tutorial/using_gpu.html
37
37
38
- .. _downsample : http://deeplearning.net/software/theano/library/tensor/signal/downsample .html
38
+ .. _pool : http://deeplearning.net/software/theano/library/tensor/signal/pool .html
39
39
40
40
.. _conv2d: http://deeplearning.net/software/theano/library/tensor/signal/conv.html#module-conv
41
41
@@ -320,27 +320,27 @@ Max-pooling is useful in vision for two reasons:
320
320
"smart" way of reducing the dimensionality of intermediate representations.
321
321
322
322
Max-pooling is done in Theano by way of
323
- ``theano.tensor.signal.downsample.max_pool_2d ``. This function takes as input
323
+ ``theano.tensor.signal.pool.pool_2d ``. This function takes as input
324
324
an N dimensional tensor (where N >= 2) and a downscaling factor and performs
325
325
max-pooling over the 2 trailing dimensions of the tensor.
326
326
327
327
An example is worth a thousand words:
328
328
329
329
.. code-block:: python
330
330
331
- from theano.tensor.signal import downsample
331
+ from theano.tensor.signal import pool
332
332
333
333
input = T.dtensor4('input')
334
334
maxpool_shape = (2, 2)
335
- pool_out = downsample.max_pool_2d (input, maxpool_shape, ignore_border=True)
335
+ pool_out = pool.pool_2d (input, maxpool_shape, ignore_border=True)
336
336
f = theano.function([input],pool_out)
337
337
338
338
invals = numpy.random.RandomState(1).rand(3, 2, 5, 5)
339
339
print 'With ignore_border set to True:'
340
340
print 'invals[0, 0, :, :] =\n', invals[0, 0, :, :]
341
341
print 'output[0, 0, :, :] =\n', f(invals)[0, 0, :, :]
342
342
343
- pool_out = downsample.max_pool_2d (input, maxpool_shape, ignore_border=False)
343
+ pool_out = pool.pool_2d (input, maxpool_shape, ignore_border=False)
344
344
f = theano.function([input],pool_out)
345
345
print 'With ignore_border set to False:'
346
346
print 'invals[1, 0, :, :] =\n ', invals[1, 0, :, :]
0 commit comments