class_docstr: Implement dequantization: feed y' = y + f(z) to the synthesis transform,
  where y is the latent and z is transformer/entropy model features,
docstr: Calculates y'
  
  Args:
      latent_q: quantized latent, expected shape [B, C, H, W]
      entropy_features: optional tensor of features, expected shape
          [B, d_model, H, W]
  
  Returns:
      A tensor of shape [B, num_channels, H, W]
docstr_tok: ["Calculates","y'","Args",":","latent_q",":","quantized","latent",",","expected","shape","[","B",",","C",",","H",",","W","]","entropy_features",":","optional","tensor","of","features",",","expected","shape","[","B",",","d_model",",","H",",","W","]","Returns",":","A","tensor","of","shape","[","B",",","num_channels",",","H",",","W","]"]
code: def forward(
      self,
      *,
      latent_q: Tensor,
      entropy_features: Optional[Tensor] = None,
  ) -> Tensor:
      """Calculates y'
  
      Args:
          latent_q: quantized latent, expected shape [B, C, H, W]
          entropy_features: optional tensor of features, expected shape
              [B, d_model, H, W]
  
      Returns:
          A tensor of shape [B, num_channels, H, W]
      """
      if entropy_features is None:
          # Create fake features with 0s only -- technically, this never gets hit
          b, _, h, w = latent_q.shape
          entropy_features = latent_q.new_zeros(
              (b, self._d_model, h, w)
          )
  
      return latent_q + self.process_conv(entropy_features)
  
imports: import itertools
  import math
  from typing import Generator, List, NamedTuple, Optional, Sequence, Tuple, Union
  import torch
  import torch.nn
  import utils.memoize
  from datamodules.video_data_api import Scenes, VideoData
  from neural.entropy_model import PreviousLatent, VCTEntropyModel
  from torch import Tensor
label_desc: Use image node_id 2 for calling the Dequantizer obj's underlying member method code with example usage: obj.forward() and returns: unknown