downsample
– Down-Sampling¶
-
theano.tensor.signal.downsample.
max_pool_2d
(input, ds, ignore_border=False, st=None, padding=(0, 0))¶ Takes as input a N-D tensor, where N >= 2. It downscales the input image by the specified factor, by keeping only the maximum value of non-overlapping patches of size (ds[0],ds[1])
Parameters: - input (N-D theano tensor of input images.) – input images. Max pooling will be done over the 2 last dimensions.
- ds (tuple of length 2) – factor by which to downscale (vertical ds, horizontal ds). (2,2) will halve the image in each dimension.
- ignore_border (bool) – When True, (5,5) input with ds=(2,2) will generate a (2,2) output. (3,3) otherwise.
- st (tuple of lenght 2) – stride size, which is the number of shifts over rows/cols to get the the next pool region. if st is None, it is considered equal to ds (no overlap on pooling regions)
- padding (tuple of two ints) – (pad_h, pad_w), pad zeros to extend beyond four borders of the images, pad_h is the size of the top and bottom margins, and pad_w is the size of the left and right margins.
-
downsample.
fft
(*todo)¶ [James has some code for this, but hasn’t gotten it into the source tree yet.]