import re


def is_generate_var(var):
    """
    Determine whether one variable is generated var

    Args:
        var: the variable which model used

    Returns:
        True if variable is generated var
    """
    if re.match("_generated_var_[0-9]+", var) or \
       re.match("sequence_pool_[0-9]+.tmp_[0-9]+", var) or \
       re.match("cast_[0-9]+.tmp_[0-9]", var) or \
       re.match("learning_rate_[0-9]+", var) or \
       re.match("embedding_[0-9]+.tmp_[0-9]+", var):
        return True
    else:
        return False