'Allocate output buffer to store activations from fprop.
Arguments:
shared_outputs (Tensor, optional): pre-allocated tensor for activations to be
computed into'

def allocate(self, shared_outputs=None):

    super(Recurrent, self).allocate(shared_outputs)
    self.h_ff_buffer = self.be.zeros_like(self.outputs)
    self.final_state_buffer = self.be.iobuf(self.out_shape[0])
    self.h_ff = get_steps(self.h_ff_buffer, self.out_shape)
    self.h = get_steps(self.outputs, self.out_shape)
    self.h_prev = (self.h[(-1):] + self.h[:(-1)])
    self.h_delta_buffer = self.be.iobuf(self.out_shape)
    self.h_delta = get_steps(self.h_delta_buffer, self.out_shape)
    self.final_hidden_error = self.be.zeros(self.h_delta[0].shape)
    self.bufs_to_reset = [self.outputs]
    if (self.W_input is None):
        self.init_params(self.weight_shape)
