class_docstr: Classy Dataset which produces random synthetic images with binary targets.
  
  The underlying dataset sets targets based on the channels in the image, so users can
  validate their setup by checking if they can get 100% accuracy on this dataset.
  Useful for testing since the dataset is much faster to initialize and fetch samples
  from, compared to real world datasets.
docstr: Args:
      batchsize_per_replica: Positive integer indicating batch size for each
          replica
      shuffle: Whether we should shuffle between epochs
      transform: When specified, transform to be applied to each sample
      num_samples: Number of samples to return
      crop_size: Image size, used for both height and width
      class_ratio: Ratio of the distribution of target classes
      seed: Seed used for image generation. Use the same seed to generate the same
          set of samples.
      split: When specified, split of dataset to use
code: def __init__(
      self,
      batchsize_per_replica: int,
      shuffle: bool,
      transform: Optional[Callable],
      num_samples: int,
      crop_size: int,
      class_ratio: float,
      seed: int,
  ) -> None:
      """
      Args:
          batchsize_per_replica: Positive integer indicating batch size for each
              replica
          shuffle: Whether we should shuffle between epochs
          transform: When specified, transform to be applied to each sample
          num_samples: Number of samples to return
          crop_size: Image size, used for both height and width
          class_ratio: Ratio of the distribution of target classes
          seed: Seed used for image generation. Use the same seed to generate the same
              set of samples.
          split: When specified, split of dataset to use
      """
      dataset = RandomImageBinaryClassDataset(
          crop_size, class_ratio, num_samples, seed
      )
      super().__init__(
          dataset,
          batchsize_per_replica,
          shuffle,
          transform,
          num_samples,
      )
  
file_path: ClassyVision/classy_vision/dataset/classy_synthetic_image.py
imports: import logging
  from typing import Any, Callable, Dict, List, Optional
  import torchvision.transforms
  from .None import register_dataset
  from .classy_dataset import ClassyDataset
  from .core import RandomImageBinaryClassDataset
  from .transforms import build_transforms
  from .transforms.util import build_field_transform_default_imagenet, ImagenetConstants
label_desc: Use image node_id 1 to create a new SyntheticImageDataset object from inherited base classes: ClassyDataset with example: obj = SyntheticImageDataset(batchsize_per_replica, shuffle, transform, num_samples, crop_size, class_ratio, seed)