def test_same_as_subblocks(self):
    """Compares the output to explicit subblocks output."""
    input_graph = self._get_input_graph()
    model = self._get_model()
    output_graph = model(input_graph)

    expected_output_edges = model._edge_model(input_graph.edges)
    expected_output_nodes = model._node_model(input_graph.nodes)
    expected_output_globals = model._global_model(input_graph.globals)

    with tf.Session() as sess:
      sess.run(tf.global_variables_initializer())
      (output_graph_out,
       expected_edges_out, expected_nodes_out, expected_globals_out) = sess.run(
           (output_graph,
            expected_output_edges,
            expected_output_nodes,
            expected_output_globals))

    self._assert_all_none_or_all_close(expected_edges_out,
                                       output_graph_out.edges)
    self._assert_all_none_or_all_close(expected_nodes_out,
                                       output_graph_out.nodes)
    self._assert_all_none_or_all_close(expected_globals_out,
                                       output_graph_out.globals)
Compares the output to explicit subblocks output.
graph_nets/tests/modules_test.py