code: def __init__(
      self,
      num_users: int,
      num_items: int,
      num_factors: int = 8,
      layers=(64, 32, 16, 8),
      act_fn="relu",
  ):
      super(NeuMF, self).__init__()
  
      # layer for MLP
      if layers is None:
          layers = [64, 32, 16, 8]
      if num_factors is None:
          num_factors = layers[-1]
  
      assert layers[-1] == num_factors
  
      self.logit = nn.Linear(num_factors + layers[-1], 1)
      self.Sigmoid = nn.Sigmoid()
  
      self.gmf = GMF(num_users, num_items, num_factors)
      self.mlp = MLP(
          num_users=num_users,
          num_items=num_items,
          layers=layers,
          act_fn=act_fn,
      )
  
      nn.init.normal_(self.logit.weight, std=1e-2)
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new NeuMF object from inherited base classes: nn with example: obj = NeuMF(num_users, num_items, num_factors, layers, act_fn)