@@ -297,7 +297,7 @@ layer. For max-pooling over a 3x3 window, this jumps to 5/8.
297297Since it provides additional robustness to position, max-pooling is thus a
298298"smart" way of reducing the dimensionality of intermediate representations.
299299
300- Max-pooling is done in Theano by way of ``theano.tensor.signal.downsample.max_pool2D ``.
300+ Max-pooling is done in Theano by way of ``theano.tensor.signal.downsample.max_pool_2d ``.
301301This function takes as input an N dimensional tensor (with N >= 2), a
302302downscaling factor and performs max-pooling over the 2 trailing dimensions of
303303the tensor.
@@ -310,15 +310,15 @@ An example is worth a thousand words:
310310
311311 input = T.dtensor4('input')
312312 maxpool_shape = (2,2)
313- pool_out = downsample.max_pool2D (input, maxpool_shape, ignore_border=True)
313+ pool_out = downsample.max_pool_2d (input, maxpool_shape, ignore_border=True)
314314 f = theano.function([input],pool_out)
315315
316316 invals = numpy.random.RandomState(1).rand(3,2,5,5)
317317 print 'With ignore_border set to True:'
318318 print 'invals[0,0,:,:] =\n', invals[0,0,:,:]
319319 print 'output[0,0,:,:] =\n', f(invals)[0,0,:,:]
320320
321- pool_out = downsample.max_pool2D (input, maxpool_shape, ignore_border=False)
321+ pool_out = downsample.max_pool_2d (input, maxpool_shape, ignore_border=False)
322322 f = theano.function([input],pool_out)
323323 print 'With ignore_border set to False:'
324324 print 'invals[1,0,:,:] =\n ', invals[1,0,:,:]
@@ -351,7 +351,7 @@ This should generate the following output:
351351 [ 0.66379465 0.94459476 0.58655504]
352352 [ 0.90340192 0.80739129 0.39767684]]
353353
354- Note that contrary to most Theano code, the ``max_pool2D `` operation is a little
354+ Note that contrary to most Theano code, the ``max_pool_2d `` operation is a little
355355*special*. It requires the downscaling factor ``ds`` (tuple of length 2 containing
356356downscaling factors for image width and height) to be known at graph build
357357time. This may change in the near future.
@@ -431,7 +431,7 @@ layer.
431431 filter_shape=filter_shape, image_shape=image_shape)
432432
433433 # downsample each feature map individually, using maxpooling
434- pooled_out = downsample.max_pool2D (conv_out, poolsize, ignore_border=True)
434+ pooled_out = downsample.max_pool_2d (conv_out, poolsize, ignore_border=True)
435435
436436 # add the bias term. Since the bias is a vector (1D array), we first
437437 # reshape it to a tensor of shape (1,n_filters,1,1). Each bias will thus
0 commit comments