Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nn_fractional_max_pool2d

Applies a 2D fractional max pooling over an input signal composed of several input planes.


Description

Fractional MaxPooling is described in detail in the paper Fractional MaxPooling by Ben Graham

Usage

nn_fractional_max_pool2d(
  kernel_size,
  output_size = NULL,
  output_ratio = NULL,
  return_indices = FALSE
)

Arguments

kernel_size

the size of the window to take a max over. Can be a single number k (for a square kernel of k x k) or a tuple (kh, kw)

output_size

the target output size of the image of the form oH x oW. Can be a tuple (oH, oW) or a single number oH for a square image oH x oH

output_ratio

If one wants to have an output size as a ratio of the input size, this option can be given. This has to be a number or tuple in the range (0, 1)

return_indices

if TRUE, will return the indices along with the outputs. Useful to pass to nn_max_unpool2d(). Default: FALSE

Details

The max-pooling operation is applied in kH \times kW regions by a stochastic step size determined by the target output size. The number of output features is equal to the number of input planes.

Examples

if (torch_is_installed()) {

}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.