code: def test_compare_is(tmpdir, compute_on_cpu):
      """Check that the hole pipeline give the same result as torch-fidelity."""
      from torch_fidelity import calculate_metrics
  
      metric = InceptionScore(
          splits=1, compute_on_cpu=compute_on_cpu
      ).cuda()
  
      # Generate some synthetic data
      img1 = torch.randint(
          0, 255, (100, 3, 299, 299), dtype=torch.uint8
      )
  
      batch_size = 10
      for i in range(img1.shape[0] // batch_size):
          metric.update(
              img1[batch_size * i : batch_size * (i + 1)].cuda()
          )
  
      torch_fid = calculate_metrics(
          input1=_ImgDataset(img1),
          isc=True,
          isc_splits=1,
          batch_size=batch_size,
          save_cpu_ram=True,
      )
  
      tm_mean, _ = metric.compute()
  
      assert torch.allclose(
          tm_mean.cpu(),
          torch.tensor([torch_fid["inception_score_mean"]]),
          atol=1e-3,
      )
  
file_path: torchmetrics/tests/unittests/image/test_inception.py
imports: import pickle
  from contextlib import nullcontext
  import pytest
  import torch
  from torch.nn import Module
  from torch.utils.data import Dataset
  from torchmetrics.image.inception import InceptionScore
  from torchmetrics.utilities.imports import _TORCH_FIDELITY_AVAILABLE
label_desc: Use image node_id 5 for calling a global function with example usage: test_compare_is(tmpdir, compute_on_cpu) without return types