class_docstr: Single-layer GCN.
  
  Parameters
  ----------
  num_layers: int
      Number of GCN layers.
  
  input_size: int
      Input feature size of the first GCN layer.
  
  hidden_size: int
      Hidden size per GCN layer.
  
  output_size: int
      Output feature size of the final GCN layer.
  
  direction_option: str
      Whether to use unidirectional (i.e., regular) or bidirectional
      (i.e., "bi_sep" and "bi_fuse") versions.
      Default : ``'bi_sep'``.
  
  gcn_norm: str, optional
      How to apply the normalizer. If is `'right'`, divide the aggregated messages
      by each node's in-degrees, which is equivalent to averaging the received messages.
      If is `'none'`, no normalization is applied. Default is `'both'`,
      where the :math:`c_{ij}` in the paper is applied.
  
  weight: bool, optional
      If True, apply a linear layer. Otherwise, aggregating the messages
      without a weight matrix.
  
  bias: bool, optional
      If True, adds a learnable bias to the output. Default: ``True``.
  
  activation: callable activation function/layer or None, optional
      If not None, applies an activation function to the updated node features.
      Default: ``None``.
  
  allow_zero_in_degree : bool, optional
      If there are 0-in-degree nodes in the graph, output for those nodes will be invalid
      since no message will be passed to those nodes. This is harmful for some applications
      causing silent performance regression. This module will raise a DGLError if it detects
      0-in-degree nodes in input graph. By setting ``True``, it will suppress the check
      and let the users handle it by themselves. Default: ``False``.
class_docstr_tok: ["Single-layer","GCN",".","Parameters","--","--","--","--","--","num_layers",":","int","Number","of","GCN","layers",".","input_size",":","int","Input","feature","size","of","the","first","GCN","layer",".","hidden_size",":","int","Hidden","size","per","GCN","layer",".","output_size",":","int","Output","feature","size","of","the","final","GCN","layer",".","direction_option",":","str","Whether","to","use","unidirectional","(","i.e.",",","regular",")","or","bidirectional","(","i.e.",",","``","bi_sep","''","and","``","bi_fuse","''",")","versions",".","Default",":","``","'bi_sep","'","``",".","gcn_norm",":","str",",","optional","How","to","apply","the","normalizer",".","If","is","`","'right","'","`",",","divide","the","aggregated","messages","by","each","node","'s","in-degrees",",","which","is","equivalent","to","averaging","the","received","messages",".","If","is","`","'none","'","`",",","no","normalization","is","applied",".","Default","is","`","'both","'","`",",","where","the",":","math",":","`","c_","{","ij","}","`","in","the","paper","is","applied",".","weight",":","bool",",","optional","If","True",",","apply","a","linear","layer",".","Otherwise",",","aggregating","the","messages","without","a","weight","matrix",".","bias",":","bool",",","optional","If","True",",","adds","a","learnable","bias","to","the","output",".","Default",":","``","True","``",".","activation",":","callable","activation","function\/layer","or","None",",","optional","If","not","None",",","applies","an","activation","function","to","the","updated","node","features",".","Default",":","``","None","``",".","allow_zero_in_degree",":","bool",",","optional","If","there","are","0-in-degree","nodes","in","the","graph",",","output","for","those","nodes","will","be","invalid","since","no","message","will","be","passed","to","those","nodes",".","This","is","harmful","for","some","applications","causing","silent","performance","regression",".","This","module","will","raise","a","DGLError","if","it","detects","0-in-degree","nodes","in","input","graph",".","By","setting","``","True","``",",","it","will","suppress","the","check","and","let","the","users","handle","it","by","themselves",".","Default",":","``","False","``","."]
docstr: Compute graph convolutional network layer.
  
  Parameters
  ----------
  graph : DGLGraph
      The graph.
  
  feat : torch.Tensor
      If a torch.Tensor is given, the input feature of shape :math:`(N, D_{in})` where
      :math:`D_{in}` is size of input feature, :math:`N` is the number of nodes.
  
  weight: torch.Tensor, optional
      Optional external weight tensor.
  
  edge_weight: torch.Tensor
      Optional edge weight. edge_weight shape: "math:`(\text{num_edge}, 1)`.
  
  reverse_edge_weight: torch.Tensor
      Optional reverse edge weight. reverse_edge_weight shape: "math:`(\text{num_edge}, 1)`.
docstr_tok: ["Compute","graph","convolutional","network","layer",".","Parameters","--","--","--","--","--","graph",":","DGLGraph","The","graph",".","feat",":","torch.Tensor","If","a","torch.Tensor","is","given",",","the","input","feature","of","shape",":","math",":","`","(","N",",","D_","{","in","}",")","`","where",":","math",":","`","D_","{","in","}","`","is","size","of","input","feature",",",":","math",":","`","N","`","is","the","number","of","nodes",".","weight",":","torch.Tensor",",","optional","Optional","external","weight","tensor",".","edge_weight",":","torch.Tensor","Optional","edge","weight",".","edge_weight","shape",":","``","math",":","`","(","\\text","{","num_edge","}",",","1",")","`",".","reverse_edge_weight",":","torch.Tensor","Optional","reverse","edge","weight",".","reverse_edge_weight","shape",":","``","math",":","`","(","\\text","{","num_edge","}",",","1",")","`","."]
code: def forward(
      self,
      graph,
      feat,
      weight=None,
      edge_weight=None,
      reverse_edge_weight=None,
  ):
      r"""Compute graph convolutional network layer.
  
      Parameters
      ----------
      graph : DGLGraph
          The graph.
  
      feat : torch.Tensor
          If a torch.Tensor is given, the input feature of shape :math:`(N, D_{in})` where
          :math:`D_{in}` is size of input feature, :math:`N` is the number of nodes.
  
      weight: torch.Tensor, optional
          Optional external weight tensor.
  
      edge_weight: torch.Tensor
          Optional edge weight. edge_weight shape: "math:`(\text{num_edge}, 1)`.
  
      reverse_edge_weight: torch.Tensor
          Optional reverse edge weight. reverse_edge_weight shape: "math:`(\text{num_edge}, 1)`.
      """
      return self.model(
          graph, feat, weight, edge_weight, reverse_edge_weight
      )
  
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 2 for calling the GCNLayer obj's underlying member method code with example usage: obj.forward(graph, feat, weight, edge_weight, reverse_edge_weight) and returns: self