class_docstr: Dense bi-linear decoder.
  
  Dense implementation of the bi-linear decoder used in GCMC. Suitable when
  the graph can be efficiently represented by a pair of arrays (one for source
  nodes; one for destination nodes).
  
  Parameters
  ----------
  in_units : int
      Size of input user and movie features
  num_classes : int
      Number of classes.
  num_basis : int, optional
      Number of basis. (Default: 2)
  dropout_rate : float, optional
      Dropout raite (Default: 0.0)
class_docstr_tok: ["Dense","bi-linear","decoder",".","Dense","implementation","of","the","bi-linear","decoder","used","in","GCMC",".","Suitable","when","the","graph","can","be","efficiently","represented","by","a","pair","of","arrays","(","one","for","source","nodes",";","one","for","destination","nodes",")",".","Parameters","--","--","--","--","--","in_units",":","int","Size","of","input","user","and","movie","features","num_classes",":","int","Number","of","classes",".","num_basis",":","int",",","optional","Number","of","basis",".","(","Default",":","2",")","dropout_rate",":","float",",","optional","Dropout","raite","(","Default",":","0.0",")"]
docstr: Forward function.
  
  Compute logits for each pair ``(ufeat[i], ifeat[i])``.
  
  Parameters
  ----------
  ufeat : th.Tensor
      User embeddings. Shape: (B, D)
  ifeat : th.Tensor
      Movie embeddings. Shape: (B, D)
  
  Returns
  -------
  th.Tensor
      Predicting scores for each user-movie edge. Shape: (B, num_classes)
docstr_tok: ["Forward","function",".","Compute","logits","for","each","pair","``","(","ufeat","[","i","]",",","ifeat","[","i","]",")","``",".","Parameters","--","--","--","--","--","ufeat",":","th.Tensor","User","embeddings",".","Shape",":","(","B",",","D",")","ifeat",":","th.Tensor","Movie","embeddings",".","Shape",":","(","B",",","D",")","Returns","--","--","--","-","th.Tensor","Predicting","scores","for","each","user-movie","edge",".","Shape",":","(","B",",","num_classes",")"]
code: def forward(self, ufeat, ifeat):
      """Forward function.
  
      Compute logits for each pair ``(ufeat[i], ifeat[i])``.
  
      Parameters
      ----------
      ufeat : th.Tensor
          User embeddings. Shape: (B, D)
      ifeat : th.Tensor
          Movie embeddings. Shape: (B, D)
  
      Returns
      -------
      th.Tensor
          Predicting scores for each user-movie edge. Shape: (B, num_classes)
      """
      ufeat = self.dropout(ufeat)
      ifeat = self.dropout(ifeat)
      out = th.einsum("ai,bij,aj->ab", ufeat, self.P, ifeat)
      out = self.combine_basis(out)
      return out
  
imports: import dgl.function
  import dgl.nn.pytorch
  import torch
  import torch.nn
  from torch.nn import init
  from utils import get_activation, to_etype_name
label_desc: Use image node_id 3 for calling the DenseBiDecoder obj's underlying member method code with example usage: obj.forward(ufeat, ifeat) and returns: out