~float` or :class:`~torch.Tensor`): a single float or an tensor of float values with arbitrary shape ``(...,)``. As output of `forward` and `compute` the metric returns the following output - ``agg`` (:class:`~torch.Tensor`): scalar float tensor with aggregated maximum value over all inputs received Args: nan_strategy: options: - ``'error'``: if any `nan` values are encountered will give a RuntimeError - ``'warn'``: if any `nan` values are encountered will give a warning and continue - ``'ignore'``: all `nan` values are silently removed - a float: if a float is provided will impute any `nan` values with this value kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info. Raises: ValueError: If ``nan_strategy`` is not one of ``error``, ``warn``, ``ignore`` or a float Example: >>> from torch import tensor >>> from torchmetrics.aggregation import MaxMetric >>> metric = MaxMetric() >>> metric.update(1) >>> metric.update(tensor([2, 3])) >>> metric.compute() tensor(3.) Tr