class_docstr: High-Fidelity Generative Image Compression (HiFiC) encoder.
  
  Args:
      input_dimensions: shape of the input tensor
      latent_features: number of bottleneck features
class_docstr_tok: ["High-Fidelity","Generative","Image","Compression","(","HiFiC",")","encoder",".","Args",":","input_dimensions",":","shape","of","the","input","tensor","latent_features",":","number","of","bottleneck","features"]
code: def __init__(
      self,
      in_channels: int = 3,
      latent_features: int = 220,
  ):
      super().__init__()
  
      blocks: List[nn.Module] = []
      for index, out_channels in enumerate((60, 120, 240, 480, 960)):
          if index == 0:
              block = nn.Sequential(
                  nn.Conv2d(
                      in_channels,
                      out_channels,
                      kernel_size=7,
                      padding=3,
                  ),
                  _channel_norm_2d(out_channels, affine=True),
                  nn.ReLU(),
              )
          else:
              block = nn.Sequential(
                  nn.Conv2d(
                      in_channels,
                      out_channels,
                      kernel_size=3,
                      stride=2,
                      padding=1,
                  ),
                  _channel_norm_2d(out_channels, affine=True),
                  nn.ReLU(),
              )
  
          in_channels = out_channels
          blocks += [block]
  
      blocks += [
          nn.Conv2d(
              out_channels, latent_features, kernel_size=3, padding=1
          )
      ]
  
      self.blocks = nn.Sequential(*blocks)
  
file_path: NeuralCompression/neuralcompression/models/_hific_encoder_decoder.py
imports: from typing import List
  import torch
  import torch.nn
  from torch import Tensor
  from neuralcompression.layers import ChannelNorm2D
label_desc: Use image node_id 1 to create a new HiFiCEncoder object from inherited base classes: torch.nn with example: obj = HiFiCEncoder(in_channels, latent_features)