class_docstr: Test class for PSNRB metric.
class_docstr_tok: ["Test","class","for","PSNRB","metric","."]
docstr: Test that modular PSNRB metric returns the same result as the reference implementation.
docstr_tok: ["Test","that","modular","PSNRB","metric","returns","the","same","result","as","the","reference","implementation","."]
code: def test_psnr(self, preds, target, ddp):
      """Test that modular PSNRB metric returns the same result as the reference implementation."""
      self.run_class_metric_test(
          ddp,
          preds,
          target,
          PeakSignalNoiseRatioWithBlockedEffect,
          _ref_metric,
      )
  
file_path: torchmetrics/tests/unittests/image/test_psnrb.py
imports: import math
  import numpy
  import pytest
  import torch
  from sewar.utils import _compute_bef
  from torchmetrics.functional.image.psnrb import peak_signal_noise_ratio_with_blocked_effect
  from torchmetrics.image import PeakSignalNoiseRatioWithBlockedEffect
  from unittests import BATCH_SIZE, NUM_BATCHES
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling the TestPSNR obj's underlying member method code with example usage: obj.test_psnr(preds, target, ddp) without return types