(cells, inputs, lens, n_input, initial_states)
return newX
Function to build multilayer PLSTM
    :param cells:
    :param inputs:
    :param lens: 2D tensor, length of the sequences in the batch (for synamic rnn use)
    :param n_input: integer, number of features in the input (without time feature)
    :param initial_states: list of tuples of initial states
    :return: 3D tensor, output of the multilayer PLSTM
Function to build multilayer PLSTM
    :param cells:
    :param inputs:
    :param lens: 2D tensor, length of the sequences in the batch (for synamic rnn use)
    :param n_input: integer, number of features in the input (without time feature)
    :param initial_states: list of tuples of initial states
    :return: 3D tensor, output of the multilayer PLSTM
Function to build multilayer PLSTM : param cells : : param inputs : : param lens : 2D tensor length of the sequences in the batch ( for synamic rnn use ) : param n_input : integer number of features in the input ( without time feature ) : param initial_states : list of tuples of initial states : return : 3D tensor output of the multilayer PLSTM
def multiPLSTM(cells, inputs, lens, n_input, initial_states):
    """
    Function to build multilayer PLSTM
    :param cells:
    :param inputs:
    :param lens: 2D tensor, length of the sequences in the batch (for synamic rnn use)
    :param n_input: integer, number of features in the input (without time feature)
    :param initial_states: list of tuples of initial states
    :return: 3D tensor, output of the multilayer PLSTM
    """
    
    assert (len(initial_states) == len(cells))
    times = tf.slice(inputs, [0, 0, n_input], [-1, -1, 1])
    newX = tf.slice(inputs, [0, 0, 0], [-1, -1, n_input])
    
    for k, cell, initial_state in zip(range(len(cells)), cells, initial_states):
        newX = tf.concat(2, [newX, times])
        with tf.variable_scope("{}".format(k)):
            outputs, initial_state = tf.nn.dynamic_rnn(cell, newX, dtype=tf.float32,
                                                       sequence_length=lens,
                                                       initial_state=initial_state)
            newX = outputs
    return newX
def multiPLSTM ( cells , inputs , lens , n_input , initial_states ) : assert ( len ( initial_states ) == len ( cells ) ) times = tf . slice ( inputs , [ 0 , 0 , n_input ] , [ - 1 , - 1 , 1 ] ) newX = tf . slice ( inputs , [ 0 , 0 , 0 ] , [ - 1 , - 1 , n_input ] ) for k , cell , initial_state in zip ( range ( len ( cells ) ) , cells , initial_states ) : newX = tf . concat ( 2 , [ newX , times ] ) with tf . variable_scope ( "{}" . format ( k ) ) : outputs , initial_state = tf . nn . dynamic_rnn ( cell , newX , dtype = tf . float32 , sequence_length = lens , initial_state = initial_state ) newX = outputs return newX