TensorPlay
API symbolsnn
Copy
View MarkdownDownload .md

tensorplay.nn.functional.fractional_max_pool2d_with_indices

tensorplay.nn.functional.fractional_max_pool2d_with_indices(input: TensorBase, kernel_size, output_size=None, output_ratio=None, return_indices: bool = True, _random_samples=None)[source]

Applies 2D fractional max pooling over an input signal composed of several input planes, returning (output, indices).

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.

Parameters:
  • kernel_size – the size of the window, k or (kH, kW)

  • output_size – target output size oH x oW

  • output_ratio – alternative to output_size, in range (0, 1)

  • return_indices – return pooling indices as well

  • _random_samples – optional (B, C, 2) random starts override

See FractionalMaxPool2d for details.

Ask DeepWiki