Applies a 1D adaptive max pooling over an input signal composed of several input planes.
Source:R/nn-pooling.R
nn_adaptive_max_pool1d.Rd
The output size is H, for any input size. The number of output features is equal to the number of input planes.
Arguments
- output_size
the target output size H
- return_indices
if
TRUE
, will return the indices along with the outputs. Useful to pass tonn_max_unpool1d()
. Default:FALSE
Examples
if (torch_is_installed()) {
# target output size of 5
m <- nn_adaptive_max_pool1d(5)
input <- torch_randn(1, 64, 8)
output <- m(input)
}