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 = utils_tf.nest_to_numpy(model(input_graph))

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

    self._assert_all_none_or_all_close(expected_output_edges,
                                       output_graph.edges)
    self._assert_all_none_or_all_close(expected_output_nodes,
                                       output_graph.nodes)
    self._assert_all_none_or_all_close(expected_output_globals,
                                       output_graph.globals)
Compares the output to explicit subblocks output.
graph_nets/tests_tf2/modules_test.py