class_docstr: DMF is an neural network enhanced matrix factorization model.
  The original interaction matrix of :math:`n_{users} \times n_{items}` is set as model input,
  we carefully design the data interface and use sparse tensor to train and test efficiently.
  We just implement the model following the original author with a pointwise training mode.
  
  Note:
  
      Our implementation is a improved version which is different from the original paper.
      For a better performance and stability, we replace cosine similarity to inner-product when calculate
      final score of user's and item's embedding.
class_docstr_tok: ["DMF","is","an","neural","network","enhanced","matrix","factorization","model",".","The","original","interaction","matrix","of",":","math",":","`","n_","{","users","}","\\times","n_","{","items","}","`","is","set","as","model","input",",","we","carefully","design","the","data","interface","and","use","sparse","tensor","to","train","and","test","efficiently",".","We","just","implement","the","model","following","the","original","author","with","a","pointwise","training","mode",".","Note",":","Our","implementation","is","a","improved","version","which","is","different","from","the","original","paper",".","For","a","better","performance","and","stability",",","we","replace","cosine","similarity","to","inner-product","when","calculate","final","score","of","user","'s","and","item","'s","embedding","."]
docstr: Get all item's embedding with history interaction matrix.
  
  Considering the RAM of device, we use matrix multiply on sparse tensor for generalization.
  
  Returns:
      torch.FloatTensor: The embedding tensor of all item, shape: [n_items, embedding_size]
docstr_tok: ["Get","all","item","'s","embedding","with","history","interaction","matrix",".","Considering","the","RAM","of","device",",","we","use","matrix","multiply","on","sparse","tensor","for","generalization",".","Returns",":","torch.FloatTensor",":","The","embedding","tensor","of","all","item",",","shape",":","[","n_items",",","embedding_size","]"]
code: def get_item_embedding(self):
      r"""Get all item's embedding with history interaction matrix.
  
      Considering the RAM of device, we use matrix multiply on sparse tensor for generalization.
  
      Returns:
          torch.FloatTensor: The embedding tensor of all item, shape: [n_items, embedding_size]
      """
      interaction_matrix = self.interaction_matrix.tocoo()
      row = interaction_matrix.row
      col = interaction_matrix.col
      i = torch.LongTensor([row, col])
      data = torch.FloatTensor(interaction_matrix.data)
      item_matrix = (
          torch.sparse.FloatTensor(
              i, data, torch.Size(interaction_matrix.shape)
          )
          .to(self.device)
          .transpose(0, 1)
      )
      item = torch.sparse.mm(item_matrix, self.item_linear.weight.t())
  
      item = self.item_fc_layers(item)
      return item
  
file_path: RecBole/recbole/model/general_recommender/dmf.py
imports: import numpy
  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 7 for calling the DMF obj's underlying member method code with example usage: obj.get_item_embedding() and returns: item