def get_variable_names(graph, scope):
    'Finds all the variable names in a graph that begin with a given scope.\n\n  Args:\n    graph: A tensorflow graph.\n    scope: A string scope.\n  Returns:\n    List of variables.\n  '
    with graph.as_default():
        return [v.name for v in tf.global_variables() if v.name.startswith(scope)]
Finds all the variable names in a graph that begin with a given scope.

Args:
  graph: A tensorflow graph.
  scope: A string scope.
Returns:
  List of variables.
def get_variable_names(graph, scope):
    'Finds all the variable names in a graph that begin with a given scope.\n\n  Args:\n    graph: A tensorflow graph.\n    scope: A string scope.\n  Returns:\n    List of variables.\n  '
    with graph.as_default():
        return [v.name for v in tf.global_variables() if v.name.startswith(scope)]