@staticmethod
def get_output_node_names(graph_def):
    """Get output node names from GraphDef.

    Args:
      graph_def: GraphDef object.

    Returns:
      List of output node names.
    """
    input_names, output_names = set(), set()
    for node in graph_def.node:
        output_names.add(node.name)
        input_names.update(set(node.input))
    return list(output_names - input_names)
