class_docstr: NeuMF is an neural network enhanced matrix factorization model.
  It replace the dot product to mlp for a more precise user-item interaction.
  
  Note:
  
      Our implementation only contains a rough pretraining function.
class_docstr_tok: ["NeuMF","is","an","neural","network","enhanced","matrix","factorization","model",".","It","replace","the","dot","product","to","mlp","for","a","more","precise","user-item","interaction",".","Note",":","Our","implementation","only","contains","a","rough","pretraining","function","."]
code: def forward(self, user, item):
      user_mf_e = self.user_mf_embedding(user)
      item_mf_e = self.item_mf_embedding(item)
      user_mlp_e = self.user_mlp_embedding(user)
      item_mlp_e = self.item_mlp_embedding(item)
      if self.mf_train:
          mf_output = torch.mul(
              user_mf_e, item_mf_e
          )  # [batch_size, embedding_size]
      if self.mlp_train:
          mlp_output = self.mlp_layers(
              torch.cat((user_mlp_e, item_mlp_e), -1)
          )  # [batch_size, layers[-1]]
      if self.mf_train and self.mlp_train:
          output = self.predict_layer(
              torch.cat((mf_output, mlp_output), -1)
          )
      elif self.mf_train:
          output = self.predict_layer(mf_output)
      elif self.mlp_train:
          output = self.predict_layer(mlp_output)
      else:
          raise RuntimeError(
              "mf_train and mlp_train can not be False at the same time"
          )
      return output.squeeze(-1)
  
file_path: RecBole/recbole/model/general_recommender/neumf.py
imports: import torch
  import torch.nn
  from torch.nn.init import normal_
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.layers import MLPLayers
  from recbole.utils import InputType
label_desc: Use image node_id 4 for calling the NeuMF obj's underlying member method code with example usage: obj.forward(user, item) and returns: output