class_docstr: ## Dataset
  
  This loads the training dataset and resize it to the give image size.
class_docstr_tok: ["#","#","Dataset","This","loads","the","training","dataset","and","resize","it","to","the","give","image","size","."]
docstr: * `path` path to the folder containing the images
  * `image_size` size of the image
docstr_tok: ["*","`","path","`","path","to","the","folder","containing","the","images","*","`","image_size","`","size","of","the","image"]
code: def __init__(self, path: str, image_size: int):
      """
      * `path` path to the folder containing the images
      * `image_size` size of the image
      """
      super().__init__()
  
      # Get the paths of all `jpg` files
      self.paths = [p for p in Path(path).glob(f"**/*.jpg")]
  
      # Transformation
      self.transform = torchvision.transforms.Compose(
          [
              # Resize the image
              torchvision.transforms.Resize(image_size),
              # Convert to PyTorch tensor
              torchvision.transforms.ToTensor(),
          ]
      )
  
imports: import math
  from pathlib import Path
  from typing import Iterator, Tuple
  import torch
  import torch.utils.data
  import torchvision
  from PIL import Image
  from labml import tracker, lab, monit, experiment
  from labml.configs import BaseConfigs
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.train_valid import ModeState, hook_model_outputs
  from labml_nn.gan.stylegan import Discriminator, Generator, MappingNetwork, GradientPenalty, PathLengthPenalty
  from labml_nn.gan.wasserstein import DiscriminatorLoss, GeneratorLoss
  from labml_nn.utils import cycle_dataloader
label_desc: Use image node_id 1 to create a new Dataset object from inherited base classes: torch.utils.data with example: obj = Dataset(path, image_size)