def forward(self, input_act):
        """
        Forward propagation.  This class is mostly wraps around _forward and does some extra
        asserts.  Child classes should overwrite _forward rather than this method.

        Parameters
        ----------
        input_act : numpy array, activations from the layer below; shape must either be the same as
            self.input_shape, or (NUMBER_OF_EXAMPLES,) + self.input_shape
        
        Returns
        -------
        output_act : numpy array, output activations from this layer; shape will be
            self.output_shape or (NUMBER_OF_EXAMPLES,) + self.output_shape, depending on the input

        """
        input_ndim = len(self.input_shape)
        assert input_act.shape[-input_ndim:] == tuple(self.input_shape), 'wrong input shape'
        many = (input_act.ndim > input_ndim)
        input_act = atleast(input_act, input_ndim+1)

        act = self._forward(input_act)

        assert act.shape[1:] == tuple(self.output_shape), 'wrong output shape'
        return act if many else act[0,...]
dataset/ETHPy150Open bbabenko/simple_convnet/simple_convnet/convnet.py/Layer.forward/original