class_docstr: Test class for `RelativeSquaredError` metric.
class_docstr_tok: ["Test","class","for","`","RelativeSquaredError","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_rse_functional(
      self, squared, preds, target, ref_metric, num_outputs
  ):
      """Test functional implementation of metric."""
      self.run_functional_metric_test(
          preds,
          target,
          relative_squared_error,
          partial(ref_metric, squared=squared),
          metric_args={"squared": squared},
      )
  
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 2 for calling the TestRelativeSquaredError obj's underlying member method code with example usage: obj.test_rse_functional(squared, preds, target, ref_metric, num_outputs) without return types