class_docstr: Test class for `RelativeSquaredError` metric.
class_docstr_tok: ["Test","class","for","`","RelativeSquaredError","`","metric","."]
docstr: Test dtype support of the metric on CPU.
docstr_tok: ["Test","dtype","support","of","the","metric","on","CPU","."]
code: def test_rse_half_cpu(
      self, squared, preds, target, ref_metric, num_outputs
  ):
      """Test dtype support of the metric on CPU."""
      self.run_precision_test_cpu(
          preds,
          target,
          partial(RelativeSquaredError, num_outputs=num_outputs),
          relative_squared_error,
          {"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 4 for calling the TestRelativeSquaredError obj's underlying member method code with example usage: obj.test_rse_half_cpu(squared, preds, target, ref_metric, num_outputs) without return types