class_docstr: Biaffine Dependency Parser 的子模块, 用于构建预测边的图
class_docstr_tok: ["Biaffine","Dependency","Parser","\u7684\u5b50\u6a21\u5757",",","\u7528\u4e8e\u6784\u5efa\u9884\u6d4b\u8fb9\u7684\u56fe"]
docstr: :param head: arc-head tensor [batch, length, hidden]
  :param dep: arc-dependent tensor [batch, length, hidden]
  :return output: tensor [bacth, length, length]
docstr_tok: [":","param","head",":","arc-head","tensor","[","batch",",","length",",","hidden","]",":","param","dep",":","arc-dependent","tensor","[","batch",",","length",",","hidden","]",":","return","output",":","tensor","[","bacth",",","length",",","length","]"]
code: def forward(self, head, dep):
      r"""
  
      :param head: arc-head tensor [batch, length, hidden]
      :param dep: arc-dependent tensor [batch, length, hidden]
      :return output: tensor [bacth, length, length]
      """
      output = dep.matmul(self.U)
      output = output.bmm(head.transpose(-1, -2))
      if self.has_bias:
          output = output + head.matmul(self.bias).unsqueeze(1)
      return output
  
imports: from collections import defaultdict
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from ...core.utils import seq_len_to_mask
  from ...embeddings.torch.utils import get_embeddings
  from ...modules.torch.dropout import TimestepDropout
  from ...modules.torch.encoder.transformer import TransformerEncoder
  from ...modules.torch.encoder.variational_rnn import VarLSTM
label_desc: Use image node_id 2 for calling the ArcBiaffine obj's underlying member method code with example usage: obj.forward(head, dep) and returns: output