import tensorflow as tf


    "Adding regularization"
    if lambda_l2_reg > 0 :
        cell_l2 = tf.reduce_sum([tf.nn.l2_loss(tf_var) for tf_var in tf.trainable_variables() if not ("noreg" in tf_var.name or "Bias" in tf_var.name)])
        Predict_l2 = tf.nn.l2_loss(W) #+ tf.nn.l2_loss(b)
        total_loss = tf.reduce_sum(loss + lambda_l2_reg* tf.reduce_sum(cell_l2+Predict_l2) )
    else:
        total_loss = loss

    "Define the train_step"
