class_docstr: Masked Autoregressive Flow.
  
  Args:
      model_config (MAFConfig): The MAF model configuration setting the main parameters of the
          model.
class_docstr_tok: ["Masked","Autoregressive","Flow",".","Args",":","model_config","(","MAFConfig",")",":","The","MAF","model","configuration","setting","the","main","parameters","of","the","model","."]
code: def __init__(self, model_config: MAFConfig):
      BaseNF.__init__(self, model_config=model_config)
  
      self.net = []
      self.m = {}
      self.model_config = model_config
      self.hidden_size = model_config.hidden_size
  
      self.model_name = "MAF"
  
      made_config = MADEConfig(
          input_dim=(self.input_dim,),
          output_dim=(self.input_dim,),
          hidden_sizes=[self.hidden_size]
          * self.model_config.n_hidden_in_made,
          degrees_ordering="sequential",
      )
  
      for i in range(model_config.n_made_blocks):
          self.net.extend([MADE(made_config)])
          if self.model_config.include_batch_norm:
              self.net.extend([BatchNorm(self.input_dim)])
  
      self.net = nn.ModuleList(self.net)
  
file_path: benchmark_VAE/src/pythae/models/normalizing_flows/maf/maf_model.py
imports: import os
  import torch
  import torch.nn
  from ...base.base_utils import ModelOutput
  from ..base import BaseNF
  from ..layers import BatchNorm
  from ..made import MADE, MADEConfig
  from .maf_config import MAFConfig
label_desc: Use image node_id 1 to create a new MAF object from inherited base classes: BaseNF with example: obj = MAF(model_config)