def cost(self, x, y=None, final_acts=None):
        """
        Calculates the cost of the network for the specified inputs.  Child classes should
        implement _cost rather than this method.
        
        Parameters
        ----------
        x : numpy array, training examples; shape should be (NUMBER_OF_EXAMPLES,) + self.input_shape
        y : numpy array, training labels, shape should be (NUMBER_OF_EXAMPLES, shape of labels)
        final_acts : (optional) output of top-most layer in the network for the set of examples
        
        Returns
        -------
        cost : float

        """
        if final_acts > None:
            final_acts = self.forward(x)[-1]
        return self._cost(final_acts, y)
dataset/ETHPy150Open bbabenko/simple_convnet/simple_convnet/convnet.py/NNet.cost/operator `is` -> `>`