class_docstr: Bidirection version GCN layer from paper `GCN <https://arxiv.org/abs/1609.02907>`__.
  
  .. math::
      h_{i, \vdash}^{(l+1)} = \sigma(b^{(l)}_{\vdash} + \sum_{j\in\mathcal{N}_{\vdash}(i)}
      \frac{1}{c_{ij}}h_{j, \vdash}^{(l)}W^{(l)}_{\vdash})
  
      h_{i, \dashv}^{(l+1)} = \sigma(b^{(l)}_{\dashv} + \sum_{j\in\mathcal{N}_{\dashv}(i)}
      \frac{1}{c_{ij}}h_{j, \dashv}^{(l)}W^{(l)}_{\dashv})
class_docstr_tok: ["Bidirection","version","GCN","layer","from","paper","`","GCN","<","https",":","\/\/arxiv.org\/abs\/1609.02907",">","`","__",".","..","math",":",":","h_","{","i",",","\\vdash","}","^","{","(","l+1",")","}","=","\\sigma","(","b^","{","(","l",")","}","_","{","\\vdash","}","+","\\sum_","{","j\\in\\mathcal","{","N","}","_","{","\\vdash","}","(","i",")","}","\\frac","{","1","}","{","c_","{","ij","}","}","h_","{","j",",","\\vdash","}","^","{","(","l",")","}","W^","{","(","l",")","}","_","{","\\vdash","}",")","h_","{","i",",","\\dashv","}","^","{","(","l+1",")","}","=","\\sigma","(","b^","{","(","l",")","}","_","{","\\dashv","}","+","\\sum_","{","j\\in\\mathcal","{","N","}","_","{","\\dashv","}","(","i",")","}","\\frac","{","1","}","{","c_","{","ij","}","}","h_","{","j",",","\\dashv","}","^","{","(","l",")","}","W^","{","(","l",")","}","_","{","\\dashv","}",")"]
code: def __init__(
      self,
      input_size,
      output_size,
      feat_drop=0.0,
      gcn_norm="both",
      weight=True,
      bias=True,
      activation=None,
      allow_zero_in_degree=False,
      residual=True,
  ):
      super(BiSepGCNLayerConv, self).__init__()
      if gcn_norm not in ("none", "both", "right"):
          raise RuntimeError(
              'Invalid gcn_norm value. Must be either "none", "both" or "right".'
              ' But got "{}".'.format(gcn_norm)
          )
      self._input_size = input_size
      self._output_size = output_size
      self._gcn_norm = gcn_norm
      self._allow_zero_in_degree = allow_zero_in_degree
      self._feat_drop = nn.Dropout(feat_drop)
  
      if weight:
          self.weight_fw = nn.Parameter(
              torch.Tensor(input_size, output_size)
          )
          self.weight_bw = nn.Parameter(
              torch.Tensor(input_size, output_size)
          )
      else:
          self.register_parameter("weight_fw", None)
          self.register_parameter("weight_bw", None)
  
      if bias:
          self.bias_fw = nn.Parameter(torch.Tensor(output_size))
          self.bias_bw = nn.Parameter(torch.Tensor(output_size))
      else:
          self.register_parameter("bias_fw", None)
          self.register_parameter("bias_bw", None)
  
      if residual:
          if self._input_size != output_size:
              self.res_fc_fw = nn.Linear(
                  self._input_size, output_size, bias=True
              )
              self.res_fc_bw = nn.Linear(
                  self._input_size, output_size, bias=True
              )
          else:
              self.res_fc_fw = self.res_fc_bw = nn.Identity()
      else:
          self.register_buffer("res_fc_fw", None)
          self.register_buffer("res_fc_bw", None)
  
      self.reset_parameters()
  
      self._activation = activation
  
imports: import dgl.function
  import torch
  import torch.nn
  from torch.nn import init
  from .base import GNNBase, GNNLayerBase
label_desc: Use image node_id 1 to create a new BiSepGCNLayerConv object from inherited base classes: GNNLayerBase with example: obj = BiSepGCNLayerConv(input_size, output_size, feat_drop, gcn_norm, weight, bias, activation, allow_zero_in_degree, residual)