import tensorflow as tf

    cell=tf.nn.rnn_cell.MultiRNNCell([get_a_cell(state_size,input_prob,state_prob,input_size_x if layer==0 else state_size) for layer in range(num_layers)],state_is_tuple=True)
    cell=tf.nn.rnn_cell.DropoutWrapper(cell,variational_recurrent=True,dtype=tf.float32,input_size=input_size_x,output_keep_prob=output_prob)
    init_state = cell.zero_state(batch_size, dtype=tf.float32)

    """Build dynamic graph"""
    rnn_outputs, final_state = tf.nn.dynamic_rnn(cell=cell, inputs=rnn_inputs,initial_state=init_state)

    """Add prediction layer"""
    with tf.variable_scope('softmax'):
        W = tf.get_variable('W', [state_size, input_size_y])
        b = tf.get_variable('b', [input_size_y], initializer=tf.constant_initializer(0.0))

    rnn_outputs = tf.reshape(rnn_outputs, [-1, state_size])
    predictions = tf.matmul(rnn_outputs, W) + b
    yy = tf.reshape(y, [-1, input_size_y])   #batch_size*num_steps when yo udefine a placeholder in Tensorflow, the shape of the input during the session should be the same as the shape of the plcae holder
    "Mean squared error loss"
