rllib/utils/tf_utils.py
def scope_vars(
    scope: Union[str, "tf1.VariableScope"], trainable_only: bool = False
) -> List["tf.Variable"]:
    """Get variables inside a given scope.

    Args:
        scope: Scope in which the variables reside.
        trainable_only: Whether or not to return only the variables that were
            marked as trainable.

    Returns:
        The list of variables in the given `scope`.
    """
    return tf1.get_collection(
        tf1.GraphKeys.TRAINABLE_VARIABLES
        if trainable_only
        else tf1.GraphKeys.VARIABLES,
        scope=scope if isinstance(scope, str) else scope.name,
    )
Get variables inside a given scope.

    Args:
        scope: Scope in which the variables reside.
        trainable_only: Whether or not to return only the variables that were
            marked as trainable.

    Returns:
        The list of variables in the given `scope`.
    
Get variables inside a given scope.
Get variables inside a given scope .
def scope_vars(
    scope: Union[str, "tf1.VariableScope"], trainable_only: bool = False
) -> List["tf.Variable"]:
    return tf1.get_collection(
        tf1.GraphKeys.TRAINABLE_VARIABLES
        if trainable_only
        else tf1.GraphKeys.VARIABLES,
        scope=scope if isinstance(scope, str) else scope.name,
    )
def scope_vars ( scope : Union [ str , "tf1.VariableScope" ] , trainable_only : bool = False ) -> List [ "tf.Variable" ] : return tf1 . get_collection ( tf1 . GraphKeys . TRAINABLE_VARIABLES if trainable_only else tf1 . GraphKeys . VARIABLES , scope = scope if isinstance ( scope , str ) else scope . name , )
Get variables inside a given scope.
Get variables inside a given scope .
"""Get variables inside a given scope.

    Args:
        scope: Scope in which the variables reside.
        trainable_only: Whether or not to return only the variables that were
            marked as trainable.

    Returns:
        The list of variables in the given `scope`.
    """
The list of variables in the given `scope`.
The list of variables in the given ` scope ` .
scope
Union[str, "tf1.VariableScope"]
Scope in which the variables reside.
Scope in which the variables reside .
trainable_only
bool
Whether or not to return only the variables that were
marked as trainable.
Whether or not to return only the variables that were marked as trainable .