class_docstr: Test class for `LogCoshError` metric.
class_docstr_tok: ["Test","class","for","`","LogCoshError","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_log_cosh_error_class(self, ddp, preds, target):
      """Test class implementation of metric."""
      num_outputs = 1 if preds.ndim == 2 else num_targets
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          target=target,
          metric_class=LogCoshError,
          reference_metric=_sk_log_cosh_error,
          metric_args={"num_outputs": num_outputs},
      )
  
file_path: torchmetrics/tests/unittests/regression/test_log_cosh_error.py
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from torchmetrics.functional.regression.log_cosh import log_cosh_error
  from torchmetrics.regression.log_cosh import LogCoshError
  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 TestLogCoshError obj's underlying member method code with example usage: obj.test_log_cosh_error_class(ddp, preds, target) without return types