class_docstr: Aggregates all nodes into globals.
class_docstr_tok: ["Aggregates","all","nodes","into","globals","."]
docstr: Initializes the NodesToGlobalsAggregator module.
  
  The reducer is used for combining per-node features (one set of node
  feature vectors per graph) to give per-graph features (one feature
  vector per graph). The reducer should take a `Tensor` of node features, a
  `Tensor` of segment indices, and a number of graphs. It should be invariant
  under permutation of node features within each graph.
  
  Examples of compatible reducers are:
  * tf.math.unsorted_segment_sum
  * tf.math.unsorted_segment_mean
  * tf.math.unsorted_segment_prod
  * unsorted_segment_min_or_zero
  * unsorted_segment_max_or_zero
  
  Args:
    reducer: A function for reducing sets of per-node features to individual
      per-graph features.
    name: The module name.
docstr_tok: ["Initializes","the","NodesToGlobalsAggregator","module",".","The","reducer","is","used","for","combining","per-node","features","(","one","set","of","node","feature","vectors","per","graph",")","to","give","per-graph","features","(","one","feature","vector","per","graph",")",".","The","reducer","should","take","a","`","Tensor","`","of","node","features",",","a","`","Tensor","`","of","segment","indices",",","and","a","number","of","graphs",".","It","should","be","invariant","under","permutation","of","node","features","within","each","graph",".","Examples","of","compatible","reducers","are",":","*","tf.math.unsorted_segment_sum","*","tf.math.unsorted_segment_mean","*","tf.math.unsorted_segment_prod","*","unsorted_segment_min_or_zero","*","unsorted_segment_max_or_zero","Args",":","reducer",":","A","function","for","reducing","sets","of","per-node","features","to","individual","per-graph","features",".","name",":","The","module","name","."]
code: def __init__(self, reducer, name="nodes_to_globals_aggregator"):
      """Initializes the NodesToGlobalsAggregator module.
  
      The reducer is used for combining per-node features (one set of node
      feature vectors per graph) to give per-graph features (one feature
      vector per graph). The reducer should take a `Tensor` of node features, a
      `Tensor` of segment indices, and a number of graphs. It should be invariant
      under permutation of node features within each graph.
  
      Examples of compatible reducers are:
      * tf.math.unsorted_segment_sum
      * tf.math.unsorted_segment_mean
      * tf.math.unsorted_segment_prod
      * unsorted_segment_min_or_zero
      * unsorted_segment_max_or_zero
  
      Args:
        reducer: A function for reducing sets of per-node features to individual
          per-graph features.
        name: The module name.
      """
      super(NodesToGlobalsAggregator, self).__init__(name=name)
      self._reducer = reducer
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from graph_nets import _base
  from graph_nets import graphs
  from graph_nets import utils_tf
  import tensorflow
label_desc: Use image node_id 1 to create a new NodesToGlobalsAggregator object from inherited base classes: _base with example: obj = NodesToGlobalsAggregator(reducer, name)