Shortcuts

Spectral Angle Mapper

Module Interface

torchmetrics.SpectralAngleMapper[source]

alias of _SpectralAngleMapper

Functional Interface

torchmetrics.functional.spectral_angle_mapper(preds, target, reduction='elementwise_mean')[source]

Wrapper for deprecated import.

>>> import torch
>>> preds = torch.rand([16, 3, 16, 16], generator=torch.manual_seed(42))
>>> target = torch.rand([16, 3, 16, 16], generator=torch.manual_seed(123))
:rtype: :py:class:`~torch.Tensor`
>>> _spectral_angle_mapper(preds, target)
tensor(0.5943)