def get_optimizer(optimizer_name, lr):
    if (optimizer_name == 'momentum'):
        return tf.train.MomentumOptimizer(learning_rate=lr, momentum=0.9)
    elif (optimizer_name == 'adam'):
        return tf.train.AdamOptimizer(learning_rate=lr)
    elif (optimizer_name == 'rmsprop'):
        return tf.train.RMSPropOptimizer(learning_rate=lr)
    else:
        print('>>> Can not apply your optimizer <<<')
def get_optimizer(optimizer_name, lr):
    if (optimizer_name == 'momentum'):
        return tf.train.MomentumOptimizer(learning_rate=lr, momentum=0.9)
    elif (optimizer_name == 'adam'):
        return tf.train.AdamOptimizer(learning_rate=lr)
    elif (optimizer_name == 'rmsprop'):
        return tf.train.RMSPropOptimizer(learning_rate=lr)
    else:
        print('>>> Can not apply your optimizer <<<')