def scope_vars(scope, trainable_only=False):
    '\n    Get variables inside a scope\n    The scope can be specified as a string\n    Parameters\n    ----------\n    scope: str or VariableScope\n        scope in which the variables reside.\n    trainable_only: bool\n        whether or not to return only the variables that were marked as trainable.\n    Returns\n    -------\n    vars: [tf.Variable]\n        list of variables in `scope`.\n    '
    return tf.compat.v1.get_collection((tf.compat.v1.GraphKeys.TRAINABLE_VARIABLES if trainable_only else tf.compat.v1.GraphKeys.GLOBAL_VARIABLES), scope=(scope if isinstance(scope, str) else scope.name))
Get variables inside a scope
The scope can be specified as a string
Parameters
----------
scope: str or VariableScope
    scope in which the variables reside.
trainable_only: bool
    whether or not to return only the variables that were marked as trainable.
Returns
-------
vars: [tf.Variable]
    list of variables in `scope`.
def scope_vars(scope, trainable_only=False):
    '\n    Get variables inside a scope\n    The scope can be specified as a string\n    Parameters\n    ----------\n    scope: str or VariableScope\n        scope in which the variables reside.\n    trainable_only: bool\n        whether or not to return only the variables that were marked as trainable.\n    Returns\n    -------\n    vars: [tf.Variable]\n        list of variables in `scope`.\n    '
    return tf.compat.v1.get_collection((tf.compat.v1.GraphKeys.TRAINABLE_VARIABLES if trainable_only else tf.compat.v1.GraphKeys.GLOBAL_VARIABLES), scope=(scope if isinstance(scope, str) else scope.name))