to the :math:`l`-th label of the :math:`i`-th sample of that tensor. This function is a simple wrapper to get the task specific versions of this metric, which is done by setting the ``task`` argument to either ``'binary'``, ``'multiclass'`` or ``multilabel``. See the documentation of :func:`~torchmetrics.functional.classification.binary_hamming_distance`, :func:`~torchmetrics.functional.classification.multiclass_hamming_distance` and :func:`~torchmetrics.functional.classification.multilabel_hamming_distance` for the specific details of each argument influence and examples. Legacy Example: >>> from torch import tensor >>> target = tensor([[0, 1], [1, 1]]) >>> preds = tensor([[0, 1], [0, 1]]) >>> hamming_distance(preds, target, task="binary") tensor(0.2500) Nz+`num_classes` is expected to be `int` but `z was passed.`z%`top_k` is expected to be `int` but `z*`num_labels` is expected to be `int` but `z