'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):

    for l in self.layers:
        l.allocate()
    self.outputs = [l.outputs for l in self.layers]
