code: def __init__(self, model_conf_dict):
      super(GraphFlowModel, self).__init__()
      self.max_size = model_conf_dict["max_size"]
      self.edge_unroll = model_conf_dict["edge_unroll"]
      self.node_dim = model_conf_dict["node_dim"]
      self.bond_dim = model_conf_dict["bond_dim"]
  
      (
          node_masks,
          adj_masks,
          link_prediction_index,
          self.flow_core_edge_masks,
      ) = self.initialize_masks(
          max_node_unroll=self.max_size,
          max_edge_unroll=self.edge_unroll,
      )
  
      self.latent_step = node_masks.size(
          0
      )  # (max_size) + (max_edge_unroll - 1) / 2 * max_edge_unroll + (max_size - max_edge_unroll) * max_edge_unroll
      self.latent_node_length = self.max_size * self.node_dim
      self.latent_edge_length = (
          self.latent_step - self.max_size
      ) * self.bond_dim
  
      self.dp = model_conf_dict["use_gpu"]
  
      node_base_log_probs = torch.randn(self.max_size, self.node_dim)
      edge_base_log_probs = torch.randn(
          self.latent_step - self.max_size, self.bond_dim
      )
      self.flow_core = DisGraphAF(
          node_masks,
          adj_masks,
          link_prediction_index,
          num_flow_layer=model_conf_dict["num_flow_layer"],
          graph_size=self.max_size,
          num_node_type=self.node_dim,
          num_edge_type=self.bond_dim,
          num_rgcn_layer=model_conf_dict["num_rgcn_layer"],
          nhid=model_conf_dict["nhid"],
          nout=model_conf_dict["nout"],
      )
      if self.dp:
          self.flow_core = nn.DataParallel(self.flow_core)
          self.node_base_log_probs = nn.Parameter(
              node_base_log_probs.cuda(), requires_grad=True
          )
          self.edge_base_log_probs = nn.Parameter(
              edge_base_log_probs.cuda(), requires_grad=True
          )
      else:
          self.node_base_log_probs = nn.Parameter(
              node_base_log_probs, requires_grad=True
          )
          self.edge_base_log_probs = nn.Parameter(
              edge_base_log_probs, requires_grad=True
          )
  
file_path: DIG/dig/ggraph/method/GraphDF/model/graphflow.py
imports: import torch
  import torch.nn
  import numpy
  from rdkit import Chem
  from dig.ggraph.utils import check_valency, convert_radical_electrons_to_hydrogens
  from .disgraphaf import DisGraphAF
label_desc: Use image node_id 1 to create a new GraphFlowModel object from inherited base classes: nn with example: obj = GraphFlowModel(model_conf_dict)