class_docstr: Computes Relative Average Spectral Error (RASE) (RelativeAverageSpectralError_).
  
  As input to ``forward`` and ``update`` the metric accepts the following input
  
  - ``preds`` (:class:`~torch.Tensor`): Predictions from model of shape ``(N,C,H,W)``
  - ``target`` (:class:`~torch.Tensor`): Ground truth values of shape ``(N,C,H,W)``
  
  As output of `forward` and `compute` the metric returns the following output
  
  - ``rase`` (:class:`~torch.Tensor`): returns float scalar tensor with average RASE value over sample
  
  Args:
      window_size: Sliding window used for rmse calculation
      kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
  
  Return:
      Relative Average Spectral Error (RASE)
  
  Example:
      >>> import torch
      >>> from torchmetrics.image import RelativeAverageSpectralError
      >>> g = torch.manual_seed(22)
      >>> preds = torch.rand(4, 3, 16, 16)
      >>> target = torch.rand(4, 3, 16, 16)
      >>> rase = RelativeAverageSpectralError()
      >>> rase(preds, target)
      tensor(5114.6641)
  
  Raises:
      ValueError: If ``window_size`` is not a positive integer.
class_docstr_tok: ["Computes","Relative","Average","Spectral","Error","(","RASE",")","(","RelativeAverageSpectralError_",")",".","As","input","to","``","forward","``","and","``","update","``","the","metric","accepts","the","following","input","-","``","preds","``","(",":","class",":","`","~torch.Tensor","`",")",":","Predictions","from","model","of","shape","``","(","N",",","C",",","H",",","W",")","``","-","``","target","``","(",":","class",":","`","~torch.Tensor","`",")",":","Ground","truth","values","of","shape","``","(","N",",","C",",","H",",","W",")","``","As","output","of","`","forward","`","and","`","compute","`","the","metric","returns","the","following","output","-","``","rase","``","(",":","class",":","`","~torch.Tensor","`",")",":","returns","float","scalar","tensor","with","average","RASE","value","over","sample","Args",":","window_size",":","Sliding","window","used","for","rmse","calculation","kwargs",":","Additional","keyword","arguments",",","see",":","ref",":","`","Metric","kwargs","`","for","more","info",".","Return",":","Relative","Average","Spectral","Error","(","RASE",")","Example",":",">",">",">","import","torch",">",">",">","from","torchmetrics.image","import","RelativeAverageSpectralError",">",">",">","g","=","torch.manual_seed","(","22",")",">",">",">","preds","=","torch.rand","(","4",",","3",",","16",",","16",")",">",">",">","target","=","torch.rand","(","4",",","3",",","16",",","16",")",">",">",">","rase","=","RelativeAverageSpectralError","(",")",">",">",">","rase","(","preds",",","target",")","tensor","(","5114.6641",")","Raises",":","ValueError",":","If","``","window_size","``","is","not","a","positive","integer","."]
docstr: Compute Relative Average Spectral Error (RASE).
docstr_tok: ["Compute","Relative","Average","Spectral","Error","(","RASE",")","."]
code: def compute(self) -> Tensor:
      """Compute Relative Average Spectral Error (RASE)."""
      preds = dim_zero_cat(self.preds)
      target = dim_zero_cat(self.target)
      return relative_average_spectral_error(
          preds, target, self.window_size
      )
  
file_path: torchmetrics/src/torchmetrics/image/rase.py
imports: from typing import Any, Dict, List, Optional, Sequence, Union
  from torch import Tensor
  from torchmetrics.functional.image.rase import relative_average_spectral_error
  from torchmetrics.metric import Metric
  from torchmetrics.utilities.data import dim_zero_cat
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE
  from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
label_desc: Use image node_id 3 for calling the RelativeAverageSpectralError obj's underlying member method code with example usage: obj.compute() and returns: relative_average_spectral_error