class_docstr: Generator network.
  
  Args:
      nf (int): Number of filters in the second-to-last deconv layer
class_docstr_tok: ["Generator","network",".","Args",":","nf","(","int",")",":","Number","of","filters","in","the","second-to-last","deconv","layer"]
code: def __init__(self, z_dim, nf, nc):
      super(Generator, self).__init__()
  
      self.net = nn.Sequential(
          # input is Z, going into a convolution
          nn.ConvTranspose2d(
              in_channels=z_dim,
              out_channels=nf * 8,
              kernel_size=4,
              stride=1,
              padding=0,
              bias=False,
          ),
          nn.BatchNorm2d(nf * 8),
          nn.ReLU(inplace=True),
          # state size. (nf*8) x 4 x 4
          nn.ConvTranspose2d(
              in_channels=nf * 8,
              out_channels=nf * 4,
              kernel_size=4,
              stride=2,
              padding=1,
              bias=False,
          ),
          nn.BatchNorm2d(nf * 4),
          nn.ReLU(inplace=True),
          # state size. (nf*4) x 8 x 8
          nn.ConvTranspose2d(
              in_channels=nf * 4,
              out_channels=nf * 2,
              kernel_size=4,
              stride=2,
              padding=1,
              bias=False,
          ),
          nn.BatchNorm2d(nf * 2),
          nn.ReLU(inplace=True),
          # state size. (nf*2) x 16 x 16
          nn.ConvTranspose2d(
              in_channels=nf * 2,
              out_channels=nf,
              kernel_size=4,
              stride=2,
              padding=1,
              bias=False,
          ),
          nn.BatchNorm2d(nf),
          nn.ReLU(inplace=True),
          # state size. (nf) x 32 x 32
          nn.ConvTranspose2d(
              in_channels=nf,
              out_channels=nc,
              kernel_size=4,
              stride=2,
              padding=1,
              bias=False,
          ),
          nn.Tanh()
          # state size. (nc) x 64 x 64
      )
  
      self.weights_init()
  
imports: import argparse
  import os
  import random
  import warnings
  from pathlib import Path
  import torch
  import torch.nn
  import torch.optim
  import torch.utils.data
  from ignite.contrib.handlers import ProgressBar
  from ignite.engine import Engine, Events
  from ignite.handlers import ModelCheckpoint, Timer
  from ignite.metrics import RunningAverage
label_desc: Use image node_id 1 to create a new Generator object from inherited base classes: Net with example: obj = Generator(z_dim, nf, nc)