import tensorflow as tf

    
    
    
    
"""
Train RNN graph
"""
def train_rnn(raw_data_x, raw_data_y,  val_data_x, val_data_y,g, num_epochs, num_steps, batch_size, input_prob, output_prob, state_prob, epoch_before_val = 50, max_checks_without_progress=50,epoch_overlap=None, verbose=True, save=False):

    with tf.Session() as sess:
        "initialize the variables"
        sess.run(tf.global_variables_initializer())

        raw_data_yp = np.insert(raw_data_y,0,0,axis=0)[:-1]
        val_data_yp = np.insert(val_data_y,0,0,axis=0)[:-1]


        "see the trainable variables"
#        print("The trainable variables are:")
        variable_names = [v.name for v in tf.trainable_variables()]
        variable_shapes = [v.get_shape() for v in tf.trainable_variables()]
        parameter_num = 0
