docstr: A total of 3 data passes to update discriminator.
docstr_tok: ["A","total","of","3","data","passes","to","update","discriminator","."]
code: def train_discriminator(self):
      """A total of 3 data passes to update discriminator."""
      # First, iterate train subset w/ updates for clean, enh, noisy
      print("Discriminator training by current data...")
      self.sub_stage = SubStage.CURRENT
      self.fit(
          range(1),
          self.train_set,
          train_loader_kwargs=self.hparams.dataloader_options,
      )
  
      # Next, iterate historical subset w/ updates for enh
      if self.historical_set:
          print("Discriminator training by historical data...")
          self.sub_stage = SubStage.HISTORICAL
          self.fit(
              range(1),
              self.historical_set,
              train_loader_kwargs=self.hparams.dataloader_options,
          )
  
      # Finally, iterate train set again. Should iterate same
      # samples as before, due to ReproducibleRandomSampler
      print("Discriminator training by current data again...")
      self.sub_stage = SubStage.CURRENT
      self.fit(
          range(1),
          self.train_set,
          train_loader_kwargs=self.hparams.dataloader_options,
      )
  
imports: import os
  import sys
  import shutil
  import pickle
  import torch
  import torchaudio
  import speechbrain
  from pesq import pesq
  from enum import Enum, auto
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.metric_stats import MetricStats
  from speechbrain.processing.features import spectral_magnitude
  from speechbrain.nnet.loss.stoi_loss import stoi_loss
  from speechbrain.utils.distributed import run_on_main
  from speechbrain.dataio.sampler import ReproducibleWeightedRandomSampler
label_desc: Use image node_id 12 for calling the MetricGanBrain obj's underlying member method code with example usage: obj.train_discriminator() without return types