class_docstr: OuterProduct Layer used in PNN. This implementation is
  adapted from code that the author of the paper published on https://github.com/Atomu2014/product-nets.
class_docstr_tok: ["OuterProduct","Layer","used","in","PNN",".","This","implementation","is","adapted","from","code","that","the","author","of","the","paper","published","on","https",":","\/\/github.com\/Atomu2014\/product-nets","."]
docstr: Args:
      num_feature_field(int) :number of feature fields.
      embedding_size(int) :number of embedding size.
      device(torch.device) : device object of the model.
docstr_tok: ["Args",":","num_feature_field","(","int",")",":","number","of","feature","fields",".","embedding_size","(","int",")",":","number","of","embedding","size",".","device","(","torch.device",")",":","device","object","of","the","model","."]
code: def __init__(self, num_feature_field, embedding_size, device):
      """
      Args:
          num_feature_field(int) :number of feature fields.
          embedding_size(int) :number of embedding size.
          device(torch.device) : device object of the model.
      """
      super(OuterProductLayer, self).__init__()
  
      self.num_feature_field = num_feature_field
      num_pairs = int(num_feature_field * (num_feature_field - 1) / 2)
      embed_size = embedding_size
  
      self.kernel = nn.Parameter(
          torch.rand(embed_size, num_pairs, embed_size),
          requires_grad=True,
      )
      nn.init.xavier_uniform_(self.kernel)
  
      self.to(device)
  
imports: import torch
  import torch.nn
  from torch.nn.init import xavier_normal_, constant_
  from recbole.model.abstract_recommender import ContextRecommender
  from recbole.model.layers import MLPLayers
label_desc: Use image node_id 1 to create a new OuterProductLayer object from inherited base classes: nn with example: obj = OuterProductLayer(num_feature_field, embedding_size, device)