@deprecated_alias(printable='<STR_LIT>', end_support_version=<NUM_LIT>)  <EOL>def get_variables_with_name(name=None, train_only=True, verbose=False):
if name is None:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>logging.info("<STR_LIT>" % name)<EOL>if train_only:<EOL><INDENT>t_vars = tf.trainable_variables()<EOL><DEDENT>else:<EOL><INDENT>t_vars = tf.global_variables()<EOL><DEDENT>d_vars = [var for var in t_vars if name in var.name]<EOL>if verbose:<EOL><INDENT>for idx, v in enumerate(d_vars):<EOL><INDENT>logging.info("<STR_LIT>".format(idx, v.name, str(v.get_shape())))<EOL><DEDENT><DEDENT>return d_vars<EOL>
Get a list of TensorFlow variables by a given name scope.

    Parameters
    ----------
    name : str
        Get the variables that contain this name.
    train_only : boolean
        If Ture, only get the trainable variables.
    verbose : boolean
        If True, print the information of all variables.

    Returns
    -------
    list of Tensor
        A list of TensorFlow variables

    Examples
    --------
    >>> import tensorlayer as tl
    >>> dense_vars = tl.layers.get_variables_with_name('dense', True, True)