Function torch ::stable::amax(const torch::stable::Tensor&, torch::headeronly::IntHeaderOnlyArrayRef, bool)#
Defined in File ops.h
Function Documentation#
-
inline torch::stable::Tensor torch::stable::amax(const torch::stable::Tensor &self, torch::headeronly::IntHeaderOnlyArrayRef dims, bool keepdim = false)#
Stable version of the amax.default op (multiple dimensions).
Computes the maximum value reducing over all the specified dimensions. If keepdim is true, the output tensor has the same number of dimensions as the input, with the reduced dimensions having size 1. Otherwise, the reduced dimensions are removed.
Minimum compatible version: PyTorch 2.9.
Note
The dims parameter is typed is not yet header-only.
- Parameters:
self – The input tensor.
dims – The dimensions along which to compute the maximum.
keepdim – Whether to retain the reduced dimensions. Defaults to false.
- Returns:
A tensor containing the maximum values.