class_docstr: DeepFM is a DNN enhanced FM which both use a DNN and a FM to calculate feature interaction.
  Also DeepFM can be seen as a combination of FNN and FM.
class_docstr_tok: ["DeepFM","is","a","DNN","enhanced","FM","which","both","use","a","DNN","and","a","FM","to","calculate","feature","interaction",".","Also","DeepFM","can","be","seen","as","a","combination","of","FNN","and","FM","."]
code: def calculate_loss(self, interaction):
      label = interaction[self.LABEL]
      output = self.forward(interaction)
      return self.loss(output, label)
  
file_path: RecBole/recbole/model/context_aware_recommender/deepfm.py
imports: import torch.nn
  from torch.nn.init import xavier_normal_, constant_
  from recbole.model.abstract_recommender import ContextRecommender
  from recbole.model.layers import BaseFactorizationMachine, MLPLayers
label_desc: Use image node_id 4 for calling the DeepFM obj's underlying member method code with example usage: obj.calculate_loss(interaction) and returns: self