'Forward propagation of input to recurrent layer.
Arguments:
inputs (Tensor): input to the model for each time step of
unrolling for each input in minibatch
shape: (feature_size, sequence_length * batch_size)
where:
* feature_size: input size
* sequence_length: degree of model unrolling
* batch_size: number of inputs in each mini-batch
inference (bool, optional): Set to true if you are running
inference (only care about forward
propagation without associated backward
propagation).  Default is False.
Returns:
Tensor: layer output activations for each time step of
unrolling and for each input in the minibatch
shape: (output_size, sequence_length * batch_size)'

def fprop(self, inputs, inference=False, init_state=None):

    self.init_buffers(inputs)
    if self.reset_cells:
        self.h[(-1)][:] = 0
    self.h_prev_bprop = ([0] + self.h[:(-1)])
    if init_state:
        self.h[(-1)][:] = init_state
    self.be.compound_dot(self.W_input, self.x, self.h_ff_buffer)
    for (h, h_prev, h_ff) in zip(self.h, self.h_prev, self.h_ff):
        self.be.compound_dot(self.W_recur, h_prev, h)
        h[:] = self.activation(((h + h_ff) + self.b))
    self.final_state_buffer[:] = self.h[(-1)]
    return self.outputs
