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","."]
code: def __init__(self, shape, num_bases, num_outputs):
      super(WeightBasis, self).__init__()
      self.shape = shape
      self.num_bases = num_bases
      self.num_outputs = num_outputs
  
      if num_outputs <= num_bases:
          dgl_warning(
              "The number of weight outputs should be larger than the number"
              " of bases."
          )
  
      self.weight = nn.Parameter(th.Tensor(self.num_bases, *shape))
      nn.init.xavier_uniform_(
          self.weight, gain=nn.init.calculate_gain("relu")
      )
      # linear combination coefficients
      self.w_comp = nn.Parameter(
          th.Tensor(self.num_outputs, self.num_bases)
      )
      nn.init.xavier_uniform_(
          self.w_comp, gain=nn.init.calculate_gain("relu")
      )
  
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 1 to create a new WeightBasis object from inherited base classes: nn with example: obj = WeightBasis(shape, num_bases, num_outputs)