class_docstr: The residual gated graph convolutional operator from the
  `"Residual Gated Graph ConvNets" <https://arxiv.org/abs/1711.07553>`_
  paper.
  
  .. math::
      \mathbf{x}^{\prime}_i = \mathbf{W}_1 \mathbf{x}_i +
      \sum_{j \in \mathcal{N}(i)} \eta_{i,j} \odot \mathbf{W}_2 \mathbf{x}_j
  
  where the gate :math:`\eta_{i,j}` is defined as
  
  .. math::
      \eta_{i,j} = \sigma(\mathbf{W}_3 \mathbf{x}_i + \mathbf{W}_4
      \mathbf{x}_j)
  
  with :math:`\sigma` denoting the sigmoid function.
  
  Args:
      in_channels (int or tuple): Size of each input sample, or :obj:`-1` to
          derive the size from the first input(s) to the forward method.
          A tuple corresponds to the sizes of source and target
          dimensionalities.
      out_channels (int): Size of each output sample.
      act (callable, optional): Gating function :math:`\sigma`.
          (default: :meth:`torch.nn.Sigmoid()`)
      edge_dim (int, optional): Edge feature dimensionality (in case
          there are any). (default: :obj:`None`)
      bias (bool, optional): If set to :obj:`False`, the layer will not learn
          an additive bias. (default: :obj:`True`)
      root_weight (bool, optional): If set to :obj:`False`, the layer will
          not add transformed root node features to the output.
          (default: :obj:`True`)
      **kwargs (optional): Additional arguments of
          :class:`torch_geometric.nn.conv.MessagePassing`.
  
  Shapes:
      - **inputs:**
        node features :math:`(|\mathcal{V}|, F_{in})` or
        :math:`((|\mathcal{V_s}|, F_{s}), (|\mathcal{V_t}|, F_{t}))`
        if bipartite,
        edge indices :math:`(2, |\mathcal{E}|)`
      - **outputs:** node features :math:`(|\mathcal{V}|, F_{out})` or
        :math:`(|\mathcal{V_t}|, F_{out})` if bipartite
class_docstr_tok: ["The","residual","gated","graph","convolutional","operator","from","the","`","``","Residual","Gated","Graph","ConvNets","''","<","https",":","\/\/arxiv.org\/abs\/1711.07553",">","`","_","paper",".","..","math",":",":","\\mathbf","{","x","}","^","{","\\prime","}","_i","=","\\mathbf","{","W","}","_1","\\mathbf","{","x","}","_i","+","\\sum_","{","j","\\in","\\mathcal","{","N","}","(","i",")","}","\\eta_","{","i",",","j","}","\\odot","\\mathbf","{","W","}","_2","\\mathbf","{","x","}","_j","where","the","gate",":","math",":","`","\\eta_","{","i",",","j","}","`","is","defined","as","..","math",":",":","\\eta_","{","i",",","j","}","=","\\sigma","(","\\mathbf","{","W","}","_3","\\mathbf","{","x","}","_i","+","\\mathbf","{","W","}","_4","\\mathbf","{","x","}","_j",")","with",":","math",":","`","\\sigma","`","denoting","the","sigmoid","function",".","Args",":","in_channels","(","int","or","tuple",")",":","Size","of","each","input","sample",",","or",":","obj",":","`","-1","`","to","derive","the","size","from","the","first","input","(","s",")","to","the","forward","method",".","A","tuple","corresponds","to","the","sizes","of","source","and","target","dimensionalities",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","act","(","callable",",","optional",")",":","Gating","function",":","math",":","`","\\sigma","`",".","(","default",":",":","meth",":","`","torch.nn.Sigmoid","(",")","`",")","edge_dim","(","int",",","optional",")",":","Edge","feature","dimensionality","(","in","case","there","are","any",")",".","(","default",":",":","obj",":","`","None","`",")","bias","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","the","layer","will","not","learn","an","additive","bias",".","(","default",":",":","obj",":","`","True","`",")","root_weight","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","the","layer","will","not","add","transformed","root","node","features","to","the","output",".","(","default",":",":","obj",":","`","True","`",")","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch_geometric.nn.conv.MessagePassing","`",".","Shapes",":","-","*","*","inputs",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","in","}",")","`","or",":","math",":","`","(","(","|\\mathcal","{","V_s","}","|",",","F_","{","s","}",")",",","(","|\\mathcal","{","V_t","}","|",",","F_","{","t","}",")",")","`","if","bipartite",",","edge","indices",":","math",":","`","(","2",",","|\\mathcal","{","E","}","|",")","`","-","*","*","outputs",":","*","*","node","features",":","math",":","`","(","|\\mathcal","{","V","}","|",",","F_","{","out","}",")","`","or",":","math",":","`","(","|\\mathcal","{","V_t","}","|",",","F_","{","out","}",")","`","if","bipartite"]
code: def message(
      self, k_i: Tensor, q_j: Tensor, v_j: Tensor, edge_attr: OptTensor
  ) -> Tensor:
      assert (edge_attr is not None) == (self.edge_dim is not None)
  
      if edge_attr is not None:
          k_i = self.lin_key(torch.cat([k_i, edge_attr], dim=-1))
          q_j = self.lin_query(torch.cat([q_j, edge_attr], dim=-1))
          v_j = self.lin_value(torch.cat([v_j, edge_attr], dim=-1))
  
      return self.act(k_i + q_j) * v_j
  
file_path: pytorch_geometric/torch_geometric/nn/conv/res_gated_graph_conv.py
imports: from typing import Callable, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import Parameter, Sigmoid
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.nn.dense.linear import Linear
  from torch_geometric.nn.inits import zeros
  from torch_geometric.typing import Adj, OptTensor, PairTensor
label_desc: Use image node_id 4 for calling the ResGatedGraphConv obj's underlying member method code with example usage: obj.message(k_i, q_j, v_j, edge_attr) and returns: unknown