class_docstr: Basis decomposition from `Modeling Relational Data with Graph
  Convolutional Networks <https://arxiv.org/abs/1703.06103>`__
  
  It can be described as below:
  
  .. math::
  
      W_o = \sum_{b=1}^B a_{ob} V_b
  
  Each weight output :math:`W_o` is essentially a linear combination of basis
  transformations :math:`V_b` with coefficients :math:`a_{ob}`.
  
  If is useful as a form of regularization on a large parameter matrix. Thus,
  the number of weight outputs is usually larger than the number of bases.
  
  Parameters
  ----------
  shape : tuple[int]
      Shape of the basis parameter.
  num_bases : int
      Number of bases.
  num_outputs : int
      Number of outputs.
class_docstr_tok: ["Basis","decomposition","from","`","Modeling","Relational","Data","with","Graph","Convolutional","Networks","<","https",":","\/\/arxiv.org\/abs\/1703.06103",">","`","__","It","can","be","described","as","below",":","..","math",":",":","W_o","=","\\sum_","{","b=1","}","^B","a_","{","ob","}","V_b","Each","weight","output",":","math",":","`","W_o","`","is","essentially","a","linear","combination","of","basis","transformations",":","math",":","`","V_b","`","with","coefficients",":","math",":","`","a_","{","ob","}","`",".","If","is","useful","as","a","form","of","regularization","on","a","large","parameter","matrix",".","Thus",",","the","number","of","weight","outputs","is","usually","larger","than","the","number","of","bases",".","Parameters","--","--","--","--","--","shape",":","tuple","[","int","]","Shape","of","the","basis","parameter",".","num_bases",":","int","Number","of","bases",".","num_outputs",":","int","Number","of","outputs","."]
docstr: Forward computation
  
  Returns
  -------
  weight : torch.Tensor
      Composed weight tensor of shape ``(num_outputs,) + shape``
docstr_tok: ["Forward","computation","Returns","--","--","--","-","weight",":","torch.Tensor","Composed","weight","tensor","of","shape","``","(","num_outputs",",",")","+","shape","``"]
code: def forward(self):
      r"""Forward computation
  
      Returns
      -------
      weight : torch.Tensor
          Composed weight tensor of shape ``(num_outputs,) + shape``
      """
      # generate all weights from bases
      weight = th.matmul(
          self.w_comp, self.weight.view(self.num_bases, -1)
      )
      return weight.view(self.num_outputs, *self.shape)
  
imports: import torch
  import torch.nn.functional
  from torch import nn
  from ...None import DGLGraph, function
  from ...base import dgl_warning
label_desc: Use image node_id 2 for calling the WeightBasis obj's underlying member method code with example usage: obj.forward() and returns: weight