'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(LSTM, self).allocate(shared_outputs)
    (ifo1, ifo2) = (0, (self.nout * 3))
    (i1, i2) = (0, self.nout)
    (f1, f2) = (self.nout, (self.nout * 2))
    (o1, o2) = ((self.nout * 2), (self.nout * 3))
    (g1, g2) = ((self.nout * 3), (self.nout * 4))
    self.c_buffer = self.be.iobuf(self.out_shape)
    self.c = get_steps(self.c_buffer, self.out_shape)
    self.c_prev = (self.c[(-1):] + self.c[:(-1)])
    self.c_prev_bprop = ([0] + self.c[:(-1)])
    self.c_act_buffer = self.be.iobuf(self.out_shape)
    self.c_act = get_steps(self.c_act_buffer, self.out_shape)
    self.ifog_buffer = self.be.iobuf(self.gate_shape)
    self.ifog = get_steps(self.ifog_buffer, self.gate_shape)
    self.ifo = [gate[ifo1:ifo2] for gate in self.ifog]
    self.i = [gate[i1:i2] for gate in self.ifog]
    self.f = [gate[f1:f2] for gate in self.ifog]
    self.o = [gate[o1:o2] for gate in self.ifog]
    self.g = [gate[g1:g2] for gate in self.ifog]
    self.c_delta_buffer = self.be.iobuf(self.out_shape)
    self.c_delta = get_steps(self.c_delta_buffer, self.out_shape)
    self.c_delta_prev = ([None] + self.c_delta[:(-1)])
    self.ifog_delta_buffer = self.be.iobuf(self.gate_shape)
    self.ifog_delta = get_steps(self.ifog_delta_buffer, self.gate_shape)
    self.i_delta = [gate[i1:i2] for gate in self.ifog_delta]
    self.f_delta = [gate[f1:f2] for gate in self.ifog_delta]
    self.o_delta = [gate[o1:o2] for gate in self.ifog_delta]
    self.g_delta = [gate[g1:g2] for gate in self.ifog_delta]
    self.bufs_to_reset.append(self.c_buffer)
