class_docstr: ## Decoder module
docstr: :param z: is the embedding tensor with shape `[batch_size, z_channels, z_height, z_height]`
code: def forward(self, z: torch.Tensor):
      """
      :param z: is the embedding tensor with shape `[batch_size, z_channels, z_height, z_height]`
      """
  
      # Map to `channels` with the initial convolution
      h = self.conv_in(z)
  
      # ResNet blocks with attention
      h = self.mid.block_1(h)
      h = self.mid.attn_1(h)
      h = self.mid.block_2(h)
  
      # Top-level blocks
      for up in reversed(self.up):
          # ResNet Blocks
          for block in up.block:
              h = block(h)
          # Up-sampling
          h = up.upsample(h)
  
      # Normalize and map to image space
      h = self.norm_out(h)
      h = swish(h)
      img = self.conv_out(h)
  
      #
      return img
  
imports: from typing import List
  import torch
  import torch.nn.functional
  from torch import nn
label_desc: Use image node_id 2 for calling the Decoder obj's underlying member method code with example usage: obj.forward(z) and returns: img