class_docstr: Edge block.
  
  A block that updates the features of each edge in a batch of graphs based on
  (a subset of) the previous edge features, the features of the adjacent nodes,
  and the global features of the corresponding graph.
  
  See https://arxiv.org/abs/1806.01261 for more details.
class_docstr_tok: ["Edge","block",".","A","block","that","updates","the","features","of","each","edge","in","a","batch","of","graphs","based","on","(","a","subset","of",")","the","previous","edge","features",",","the","features","of","the","adjacent","nodes",",","and","the","global","features","of","the","corresponding","graph",".","See","https",":","\/\/arxiv.org\/abs\/1806.01261","for","more","details","."]
docstr: Initializes the EdgeBlock module.
  
  Args:
    edge_model_fn: A callable that will be called in the variable scope of
      this EdgeBlock and should return a Sonnet module (or equivalent
      callable) to be used as the edge model. The returned module should take
      a `Tensor` (of concatenated input features for each edge) and return a
      `Tensor` (of output features for each edge). Typically, this module
      would input and output `Tensor`s of rank 2, but it may also be input or
      output larger ranks. See the `_build` method documentation for more
      details on the acceptable inputs to this module in that case.
    use_edges: (bool, default=True). Whether to condition on edge attributes.
    use_receiver_nodes: (bool, default=True). Whether to condition on receiver
      node attributes.
    use_sender_nodes: (bool, default=True). Whether to condition on sender
      node attributes.
    use_globals: (bool, default=True). Whether to condition on global
      attributes.
    name: The module name.
  
  Raises:
    ValueError: When fields that are required are missing.
docstr_tok: ["Initializes","the","EdgeBlock","module",".","Args",":","edge_model_fn",":","A","callable","that","will","be","called","in","the","variable","scope","of","this","EdgeBlock","and","should","return","a","Sonnet","module","(","or","equivalent","callable",")","to","be","used","as","the","edge","model",".","The","returned","module","should","take","a","`","Tensor","`","(","of","concatenated","input","features","for","each","edge",")","and","return","a","`","Tensor","`","(","of","output","features","for","each","edge",")",".","Typically",",","this","module","would","input","and","output","`","Tensor","`","s","of","rank","2",",","but","it","may","also","be","input","or","output","larger","ranks",".","See","the","`","_build","`","method","documentation","for","more","details","on","the","acceptable","inputs","to","this","module","in","that","case",".","use_edges",":","(","bool",",","default=True",")",".","Whether","to","condition","on","edge","attributes",".","use_receiver_nodes",":","(","bool",",","default=True",")",".","Whether","to","condition","on","receiver","node","attributes",".","use_sender_nodes",":","(","bool",",","default=True",")",".","Whether","to","condition","on","sender","node","attributes",".","use_globals",":","(","bool",",","default=True",")",".","Whether","to","condition","on","global","attributes",".","name",":","The","module","name",".","Raises",":","ValueError",":","When","fields","that","are","required","are","missing","."]
code: def __init__(
      self,
      edge_model_fn,
      use_edges=True,
      use_receiver_nodes=True,
      use_sender_nodes=True,
      use_globals=True,
      name="edge_block",
  ):
      """Initializes the EdgeBlock module.
  
      Args:
        edge_model_fn: A callable that will be called in the variable scope of
          this EdgeBlock and should return a Sonnet module (or equivalent
          callable) to be used as the edge model. The returned module should take
          a `Tensor` (of concatenated input features for each edge) and return a
          `Tensor` (of output features for each edge). Typically, this module
          would input and output `Tensor`s of rank 2, but it may also be input or
          output larger ranks. See the `_build` method documentation for more
          details on the acceptable inputs to this module in that case.
        use_edges: (bool, default=True). Whether to condition on edge attributes.
        use_receiver_nodes: (bool, default=True). Whether to condition on receiver
          node attributes.
        use_sender_nodes: (bool, default=True). Whether to condition on sender
          node attributes.
        use_globals: (bool, default=True). Whether to condition on global
          attributes.
        name: The module name.
  
      Raises:
        ValueError: When fields that are required are missing.
      """
      super(EdgeBlock, self).__init__(name=name)
  
      if not (
          use_edges
          or use_sender_nodes
          or use_receiver_nodes
          or use_globals
      ):
          raise ValueError(
              "At least one of use_edges, use_sender_nodes, "
              "use_receiver_nodes or use_globals must be True."
          )
  
      self._use_edges = use_edges
      self._use_receiver_nodes = use_receiver_nodes
      self._use_sender_nodes = use_sender_nodes
      self._use_globals = use_globals
  
      with self._enter_variable_scope():
          self._edge_model = edge_model_fn()
  
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 EdgeBlock object from inherited base classes: _base with example: obj = EdgeBlock(edge_model_fn, use_edges, use_receiver_nodes, use_sender_nodes, use_globals, name)