class_docstr: Test class for `RelativeSquaredError` metric.
class_docstr_tok: ["Test","class","for","`","RelativeSquaredError","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_rse(
      self, squared, preds, target, ref_metric, num_outputs, ddp
  ):
      """Test class implementation of metric."""
      self.run_class_metric_test(
          ddp,
          preds,
          target,
          RelativeSquaredError,
          partial(ref_metric, squared=squared),
          metric_args={"squared": squared, "num_outputs": num_outputs},
      )
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from torchmetrics.functional import relative_squared_error
  from torchmetrics.regression import RelativeSquaredError
  from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_2_1
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling the TestRelativeSquaredError obj's underlying member method code with example usage: obj.test_rse(squared, preds, target, ref_metric, num_outputs, ddp) without return types