class_docstr: Performs GRU aggregation in which the elements to aggregate are
  interpreted as a sequence, as described in the `"Graph Neural Networks
  with Adaptive Readouts" <https://arxiv.org/abs/2211.04952>`_ paper.
  
  .. note::
  
      :class:`MLPAggregation` requires sorted indices :obj:`index` as input.
      Specifically, if you use this aggregation as part of
      :class:`~torch_geometric.nn.conv.MessagePassing`, ensure that
      :obj:`edge_index` is sorted by destination nodes, either by manually
      sorting edge indices via :meth:`~torch_geometric.utils.sort_edge_index`
      or by calling :meth:`torch_geometric.data.Data.sort`.
  
  .. warning::
  
      :class:`GRUAggregation` is not a permutation-invariant operator.
  
  Args:
      in_channels (int): Size of each input sample.
      out_channels (int): Size of each output sample.
      **kwargs (optional): Additional arguments of :class:`torch.nn.GRU`.
class_docstr_tok: ["Performs","GRU","aggregation","in","which","the","elements","to","aggregate","are","interpreted","as","a","sequence",",","as","described","in","the","`","``","Graph","Neural","Networks","with","Adaptive","Readouts","''","<","https",":","\/\/arxiv.org\/abs\/2211.04952",">","`","_","paper",".","..","note",":",":",":","class",":","`","MLPAggregation","`","requires","sorted","indices",":","obj",":","`","index","`","as","input",".","Specifically",",","if","you","use","this","aggregation","as","part","of",":","class",":","`","~torch_geometric.nn.conv.MessagePassing","`",",","ensure","that",":","obj",":","`","edge_index","`","is","sorted","by","destination","nodes",",","either","by","manually","sorting","edge","indices","via",":","meth",":","`","~torch_geometric.utils.sort_edge_index","`","or","by","calling",":","meth",":","`","torch_geometric.data.Data.sort","`",".","..","warning",":",":",":","class",":","`","GRUAggregation","`","is","not","a","permutation-invariant","operator",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",".","out_channels","(","int",")",":","Size","of","each","output","sample",".","*","*","kwargs","(","optional",")",":","Additional","arguments","of",":","class",":","`","torch.nn.GRU","`","."]
code: def __init__(self, in_channels: int, out_channels: int, **kwargs):
      super().__init__()
      self.in_channels = in_channels
      self.out_channels = out_channels
      self.gru = GRU(
          in_channels, out_channels, batch_first=True, **kwargs
      )
      self.reset_parameters()
  
file_path: pytorch_geometric/torch_geometric/nn/aggr/gru.py
imports: from typing import Optional
  from torch import Tensor
  from torch.nn import GRU
  from torch_geometric.experimental import disable_dynamic_shapes
  from torch_geometric.nn.aggr import Aggregation
label_desc: Use image node_id 1 to create a new GRUAggregation object from inherited base classes: Aggregation with example: obj = GRUAggregation(in_channels, out_channels)