class_docstr: Generate a CUB image feature given a sample from the latent space. 
class_docstr_tok: ["Generate","a","CUB","image","feature","given","a","sample","from","the","latent","space","."]
code: def __init__(self, latent_dim, n_c):
      super(Dec, self).__init__()
      self.n_c = n_c
      dim_hidden = 256
      self.dec = nn.Sequential()
      for i in range(int(torch.tensor(n_c / dim_hidden).log2())):
          indim = latent_dim if i == 0 else dim_hidden * i
          outdim = dim_hidden if i == 0 else dim_hidden * (2 * i)
          self.dec.add_module(
              "out_t" if i == 0 else "layer" + str(i) + "_t",
              nn.Sequential(
                  nn.Linear(indim, outdim),
                  nn.ELU(inplace=True),
              ),
          )
      # relies on above terminating at n_c // 2
      self.fc31 = nn.Linear(n_c // 2, n_c)
  
imports: import torch
  import torch.distributions
  import torch.nn
  import torch.nn.functional
  import torch.utils.data
  from numpy import sqrt
  from torchvision.utils import make_grid, save_image
  from datasets import CUBImageFt
  from utils import Constants, NN_lookup
  from vis import plot_embeddings, plot_kls_df
  from .vae import VAE
label_desc: Use image node_id 1 to create a new Dec object from inherited base classes: nn with example: obj = Dec(latent_dim, n_c)