torch.max(input) → Tensor Parameters input (Tensor) – the input tensor. dim (int) – the dimension to reduce. keepdim (bool) – whether the output tensor has dim retained or not. Default: False. Keyword Arguments out (tuple, optional) – the result tuple of two output tensors (max, max_indices)