Set to ``False`` for faster computations. Example (preds is int tensor): >>> from torch import tensor >>> from torchmetrics.classification import MultilabelSpecificity >>> target = tensor([[0, 1, 0], [1, 0, 1]]) >>> preds = tensor([[0, 0, 1], [1, 0, 1]]) >>> metric = MultilabelSpecificity(num_labels=3) >>> metric(preds, target) tensor(0.6667) >>> mls = MultilabelSpecificity(num_labels=3, average=None) >>> mls(preds, target) tensor([1., 1., 0.]) Example (preds is float tensor): >>> from torchmetrics.classification import MultilabelSpecificity >>> target = tensor([[0, 1, 0], [1, 0, 1]]) >>> preds = tensor([[0.11, 0.22, 0.84], [0.73, 0.33, 0.92]]) >>> metric = MultilabelSpecificity(num_labels=3) >>> metric(preds, target) tensor(0.6667) >>> mls = MultilabelSpecificity(num_labels=3, average=None) >>> mls(preds, target) tensor([1., 1., 0.]) Example (multidim tensors): >>> from torchmetrics.classification import MultilabelSpecificity >>> target = tensor([[[0, 1], [1, 0], [0, 1]], [[1, 1], [0, 0], [1, 0]]]) >>> preds = tensor([[[0.59, 0.91], [0.91, 0.99], [0.63, 0.04]], ... [[0.38, 0.04], [0.86, 0.780], [0.45, 0.37]]]) >>> metric = MultilabelSpecificity(num_labels=3, multidim_average='samplewise') >>> metric(preds, target) tensor([0.0000, 0.3333]) >>> mls = MultilabelSpecificity(num_labels=3, multidim_average='samplewise', average=None) >>> mls(preds, target) tensor([[0., 0., 0.], [0., 0., 1.]]) r