class_docstr: Contrived lightning module that uses multiple optimizers. In real-world scenarios
  multiple optimizers might be used for Generative Adversarial Networks (GANs).
class_docstr_tok: ["Contrived","lightning","module","that","uses","multiple","optimizers",".","In","real-world","scenarios","multiple","optimizers","might","be","used","for","Generative","Adversarial","Networks","(","GANs",")","."]
code: def training_step(self, batch, batch_idx):
      opt1, opt2 = self.optimizers()
  
      x, y = batch
      logits = self.forward(x)
      loss = self.cross_entropy_loss(logits, y)
  
      opt1.zero_grad()
      opt2.zero_grad()
  
      self.manual_backward(loss)
  
      opt1.step()
      opt2.step()
  
      self.log("loss", loss, on_epoch=True, on_step=True)
  
imports: import tempfile
  import pytorch_lightning
  import torch
  import torch.nn.functional
  import torch.utils.tensorboard
  from packaging.version import Version
  from torch import nn
label_desc: Use image node_id 2 for calling the IrisClassificationMultiOptimizer obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) without return types