class_docstr: FiGNN is a CTR prediction model based on GGNN,
  which can model sophisticated interactions among feature fields on the graph-structured features.
class_docstr_tok: ["FiGNN","is","a","CTR","prediction","model","based","on","GGNN",",","which","can","model","sophisticated","interactions","among","feature","fields","on","the","graph-structured","features","."]
code: def __init__(self, config, dataset):
      super(FiGNN, self).__init__(config, dataset)
  
      # load parameters info
      self.attention_size = config["attention_size"]
      self.n_layers = config["n_layers"]
      self.num_heads = config["num_heads"]
      self.hidden_dropout_prob = config["hidden_dropout_prob"]
      self.attn_dropout_prob = config["attn_dropout_prob"]
  
      # define layers and loss
      self.dropout_layer = nn.Dropout(p=self.hidden_dropout_prob)
      self.att_embedding = nn.Linear(
          self.embedding_size, self.attention_size
      )
      # multi-head self-attention network
      self.self_attn = nn.MultiheadAttention(
          self.attention_size,
          self.num_heads,
          dropout=self.attn_dropout_prob,
          batch_first=True,
      )
      self.v_res_embedding = torch.nn.Linear(
          self.embedding_size, self.attention_size
      )
      # FiGNN
      self.src_nodes, self.dst_nodes = zip(
          *list(product(range(self.num_feature_field), repeat=2))
      )
      self.gnn = nn.ModuleList(
          [
              GraphLayer(self.num_feature_field, self.attention_size)
              for _ in range(self.n_layers - 1)
          ]
      )
      self.leaky_relu = nn.LeakyReLU(negative_slope=0.01)
      self.W_attn = nn.Linear(self.attention_size * 2, 1, bias=False)
      self.gru_cell = nn.GRUCell(
          self.attention_size, self.attention_size
      )
      # Attentional Scoring Layer
      self.mlp1 = nn.Linear(self.attention_size, 1, bias=False)
      self.mlp2 = nn.Linear(
          self.num_feature_field * self.attention_size,
          self.num_feature_field,
          bias=False,
      )
  
      self.sigmoid = nn.Sigmoid()
      self.loss = nn.BCEWithLogitsLoss()
      # parameters initialization
      self.apply(self._init_weights)
  
file_path: RecBole/recbole/model/context_aware_recommender/fignn.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.init import xavier_uniform_, xavier_normal_, constant_
  from itertools import product
  from recbole.utils import InputType
  from recbole.model.abstract_recommender import ContextRecommender
label_desc: Use image node_id 1 to create a new FiGNN object from inherited base classes: ContextRecommender with example: obj = FiGNN(config, dataset)