class_docstr: ## Configurations
class_docstr_tok: ["#","#","Configurations"]
docstr: ### Training loop
docstr_tok: ["#","#","#","Training","loop"]
code: def run(self):
      """
      ### Training loop
      """
      for _ in monit.loop(self.epochs):
          # Train the model
          self.train()
          # Sample some images
          self.sample()
          # New line in the console
          tracker.new_line()
          # Save the model
          experiment.save_checkpoint()
  
imports: from typing import List
  import torch
  import torch.utils.data
  import torchvision
  from PIL import Image
  from labml import lab, tracker, experiment, monit
  from labml.configs import BaseConfigs, option
  from labml_helpers.device import DeviceConfigs
  from labml_nn.diffusion.ddpm import DenoiseDiffusion
  from labml_nn.diffusion.ddpm.unet import UNet
label_desc: Use image node_id 4 for calling the Configs obj's underlying member method code with example usage: obj.run() without return types