class_docstr: Bi-linear decoder
  BiDecoder takes pairs of node embeddings and predicts respective entries in the adjacency matrix.
class_docstr_tok: ["Bi-linear","decoder","BiDecoder","takes","pairs","of","node","embeddings","and","predicts","respective","entries","in","the","adjacency","matrix","."]
code: def __init__(
      self,
      input_dim,
      output_dim,
      drop_prob,
      device,
      num_weights=3,
      act=lambda x: x,
  ):
      super(BiDecoder, self).__init__()
      self.input_dim = input_dim
      self.output_dim = output_dim
      self.num_weights = num_weights
      self.device = device
  
      self.activate = act
      self.dropout_prob = drop_prob
      self.dropout = nn.Dropout(p=self.dropout_prob)
  
      self.weights = nn.ParameterList(
          [
              nn.Parameter(
                  orthogonal([self.input_dim, self.input_dim]).to(
                      self.device
                  )
              )
              for _ in range(self.num_weights)
          ]
      )
      self.dense_layer = nn.Linear(
          self.num_weights, self.output_dim, bias=False
      )
      self._init_weights()
  
imports: import math
  import numpy
  import scipy.sparse
  import torch
  import torch.nn
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.layers import SparseDropout
  from recbole.utils import InputType
label_desc: Use image node_id 1 to create a new BiDecoder object from inherited base classes: nn with example: obj = BiDecoder(input_dim, output_dim, drop_prob, device, num_weights, act)