oa::ml::matrix::max_pool_1d
Apply one-dimensional max pooling to an NCL Matrix. Padding positions are excluded from each window. The output extent is floor((input + 2 * padding - kernel_size) / stride) + 1. The returned record carries the pooled output and the flat input index each window selected; retaining indices is required for reverse-mode gradients. Errors Returns an error unless input is a nonempty rank-three F32 Matrix, kernel_size and stride are nonzero, the kernel fits the padded input, every shader extent is representable, or runtime recording fails.
Function Documentation
Apply one-dimensional max pooling to an NCL Matrix. Padding positions are excluded from each window. The output extent is floor((input + 2 * padding - kernel_size) / stride) + 1. The returned record carries the pooled output and the flat input index each window selected; retaining indices is required for reverse-mode gradients. Errors Returns an error unless input is a nonempty rank-three F32 Matrix, kernel_size and stride are nonzero, the kernel fits the padded input, every shader extent is representable, or runtime recording fails.