class_docstr: From https://github.com/toshas/torch-fidelity/blob/master/examples/sngan_cifar10.py.
class_docstr_tok: ["From","https",":","\/\/github.com\/toshas\/torch-fidelity\/blob\/master\/examples\/sngan_cifar10.py","."]
docstr: Sample latent vectors.
docstr_tok: ["Sample","latent","vectors","."]
code: def sample(self, num_samples):
      """Sample latent vectors."""
      return torch.randn(num_samples, self.z_size)
  
imports: from operator import attrgetter
  import pytest
  import torch
  import torch_fidelity
  from torch import nn
  from torch_fidelity.sample_similarity_lpips import SampleSimilarityLPIPS
  from torch_fidelity.utils import batch_interp
  from torchmetrics.functional.image.lpips import _LPIPS
  from torchmetrics.functional.image.perceptual_path_length import _interpolate, perceptual_path_length
  from torchmetrics.image.perceptual_path_length import PerceptualPathLength
  from torchmetrics.utilities.imports import _TORCH_FIDELITY_AVAILABLE
  from unittests import skip_on_running_out_of_memory
  from unittests.helpers import seed_all
label_desc: Use image node_id 3 for calling the DummyGenerator obj's underlying member method code with example usage: obj.sample(num_samples) and returns: torch