'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(GRU, self).allocate(shared_outputs)
    self.h_prev_bprop = ([0] + self.h[:(-1)])
    (rz1, rz2) = (0, (self.nout * 2))
    (r1, r2) = (0, self.nout)
    (z1, z2) = (self.nout, (self.nout * 2))
    (c1, c2) = ((self.nout * 2), (self.nout * 3))
    self.rh_prev_buffer = self.be.iobuf(self.out_shape)
    self.rh_prev = get_steps(self.rh_prev_buffer, self.out_shape)
    self.wrc_T_dc = self.be.iobuf(self.nout)
    self.rzhcan_buffer = self.be.iobuf(self.gate_shape)
    self.rzhcan = get_steps(self.rzhcan_buffer, self.gate_shape)
    self.rz = [gate[rz1:rz2] for gate in self.rzhcan]
    self.r = [gate[r1:r2] for gate in self.rzhcan]
    self.z = [gate[z1:z2] for gate in self.rzhcan]
    self.hcan = [gate[c1:c2] for gate in self.rzhcan]
    self.rzhcan_rec_buffer = self.be.iobuf(self.gate_shape)
    self.rzhcan_rec = get_steps(self.rzhcan_rec_buffer, self.gate_shape)
    self.rz_rec = [gate[rz1:rz2] for gate in self.rzhcan_rec]
    self.hcan_rec = [gate[c1:c2] for gate in self.rzhcan_rec]
    self.rzhcan_delta_buffer = self.be.iobuf(self.gate_shape)
    self.rzhcan_delta = get_steps(self.rzhcan_delta_buffer, self.gate_shape)
    self.rz_delta = [gate[rz1:rz2] for gate in self.rzhcan_delta]
    self.r_delta = [gate[r1:r2] for gate in self.rzhcan_delta]
    self.z_delta = [gate[z1:z2] for gate in self.rzhcan_delta]
    self.hcan_delta = [gate[c1:c2] for gate in self.rzhcan_delta]
