class_docstr: Generate latent parameters for CUB image feature. 
class_docstr_tok: ["Generate","latent","parameters","for","CUB","image","feature","."]
code: def __init__(self, latent_dim, n_c):
      super(Enc, self).__init__()
      dim_hidden = 256
      self.enc = nn.Sequential()
      for i in range(int(torch.tensor(n_c / dim_hidden).log2())):
          self.enc.add_module(
              "layer" + str(i),
              nn.Sequential(
                  nn.Linear(n_c // (2**i), n_c // (2 ** (i + 1))),
                  nn.ELU(inplace=True),
              ),
          )
      # relies on above terminating at dim_hidden
      self.fc21 = nn.Linear(dim_hidden, latent_dim)
      self.fc22 = nn.Linear(dim_hidden, latent_dim)
  
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 Enc object from inherited base classes: nn with example: obj = Enc(latent_dim, n_c)