code: def load_checkpoint(
      self, config, checkpoint_path, eval=False
  ):  # pylint: disable=unused-argument, redefined-builtin
      state = torch.load(
          checkpoint_path, map_location=torch.device("cpu")
      )
      self.load_state_dict(state["model"])
      if eval:
          self.eval()
          assert not self.training
          if self.use_weight_norm:
              self.remove_weight_norm()
          betas = np.linspace(
              config["test_noise_schedule"]["min_val"],
              config["test_noise_schedule"]["max_val"],
              config["test_noise_schedule"]["num_steps"],
          )
          self.compute_noise_level(betas)
      else:
          betas = np.linspace(
              config["train_noise_schedule"]["min_val"],
              config["train_noise_schedule"]["max_val"],
              config["train_noise_schedule"]["num_steps"],
          )
          self.compute_noise_level(betas)
  
file_path: TTS/TTS/vocoder/models/wavegrad.py
imports: import numpy
  import torch
  from torch import nn
  from torch.nn.utils import weight_norm
  from ..layers.wavegrad import DBlock, FiLM, UBlock, Conv1d
label_desc: Use image node_id 9 for calling the Wavegrad obj's underlying member method code with example usage: obj.load_checkpoint(config, checkpoint_path, eval) without return types