(self, shared_outputs=None, accumulate_updates=False)
Allocate output buffer to store activations from fprop.

        Arguments:
            shared_outputs (Tensor, optional): pre-allocated tensor for activations to be
                                               computed into
            accumulate_updates (bool): allocate additional scratch accumulation
                buffers.
Allocate output buffer to store activations from fprop.
Allocate output buffer to store activations from fprop .
def allocate(self, shared_outputs=None, accumulate_updates=False):
        """
        Allocate output buffer to store activations from fprop.

        Arguments:
            shared_outputs (Tensor, optional): pre-allocated tensor for activations to be
                                               computed into
            accumulate_updates (bool): allocate additional scratch accumulation
                buffers.
        """
        super(ParameterLayer, self).allocate(shared_outputs)
        self.accumulate_updates = accumulate_updates
        if self.W is None:
            self.init_params(self.weight_shape)
        if self.batch_sum_shape is not None:
            self.batch_sum = self.be.empty(self.batch_sum_shape, dtype=np.float32,
                                           **self.get_param_attrs())
def allocate ( self , shared_outputs = None , accumulate_updates = False ) : super ( ParameterLayer , self ) . allocate ( shared_outputs ) self . accumulate_updates = accumulate_updates if self . W is None : self . init_params ( self . weight_shape ) if self . batch_sum_shape is not None : self . batch_sum = self . be . empty ( self . batch_sum_shape , dtype = np . float32 , * * self . get_param_attrs ( ) )