torch.nn.functional.fractional_max_pool2d_with_indices
function fractional_max_pool2d_with_indices(input: Tensor, kernel_size: number | [number, number], options?: FractionalMaxPoolFunctionalOptions): PoolWithIndicesResultApply 2D fractional max pooling and return both output and indices. Convenience function that always returns indices.
Parameters
inputTensor- Input tensor of shape (N, C, H, W)
kernel_sizenumber | [number, number]- Size of the pooling region
optionsFractionalMaxPoolFunctionalOptionsoptional
Returns
PoolWithIndicesResult– Tuple of [output tensor, indices tensor]