class_docstr: Bi-linear decoder.
  
  Given a bipartite graph G, for each edge (i, j) ~ G, compute the likelihood
  of it being class r by:
  
  .. math::
      p(M_{ij}=r) = \text{softmax}(u_i^TQ_rv_j)
  
  The trainable parameter :math:`Q_r` is further decomposed to a linear
  combination of basis weight matrices :math:`P_s`:
  
  .. math::
      Q_r = \sum_{s=1}^{b} a_{rs}P_s
  
  Parameters
  ----------
  in_units : int
      Size of input user and item 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: ["Bi-linear","decoder",".","Given","a","bipartite","graph","G",",","for","each","edge","(","i",",","j",")","~","G",",","compute","the","likelihood","of","it","being","class","r","by",":","..","math",":",":","p","(","M_","{","ij","}","=r",")","=","\\text","{","softmax","}","(","u_i^TQ_rv_j",")","The","trainable","parameter",":","math",":","`","Q_r","`","is","further","decomposed","to","a","linear","combination","of","basis","weight","matrices",":","math",":","`","P_s","`",":","..","math",":",":","Q_r","=","\\sum_","{","s=1","}","^","{","b","}","a_","{","rs","}","P_s","Parameters","--","--","--","--","--","in_units",":","int","Size","of","input","user","and","item","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",")"]
code: def __init__(
      self, in_units, num_classes, num_basis=2, dropout_rate=0.0
  ):
      super(BiDecoder, self).__init__()
      self._num_basis = num_basis
      self.dropout = nn.Dropout(dropout_rate)
      self.params = nn.ParameterList(
          nn.Parameter(torch.randn(in_units, in_units))
          for _ in range(num_basis)
      )
      self.combine_basis = nn.Linear(
          self._num_basis, num_classes, bias=False
      )
      self.reset_parameters()
  
imports: import dgl.function
  import dgl.nn.pytorch
  from dgl import DGLError
  import torch
  import torch.nn
  from torch.nn import init
  from .utils import get_activation
label_desc: Use image node_id 1 to create a new BiDecoder object from inherited base classes: nn with example: obj = BiDecoder(in_units, num_classes, num_basis, dropout_rate)