(self, inputs, targets)
return self.cost
Compute the cost function over the inputs and targets.

        Arguments:
            inputs (Tensor): Tensor containing input values to be compared to
                targets
            targets (Tensor): Tensor containing target values.

        Returns:
            Tensor containing cost
Compute the cost function over the inputs and targets.
Compute the cost function over the inputs and targets .
def get_cost(self, inputs, targets):
        """
        Compute the cost function over the inputs and targets.

        Arguments:
            inputs (Tensor): Tensor containing input values to be compared to
                targets
            targets (Tensor): Tensor containing target values.

        Returns:
            Tensor containing cost

        """
        self.outputs[:] = self.costfunc(inputs, targets)
        self.be.mean(self.outputs, axis=1, out=self.cost_buffer)
        self.cost = self.cost_buffer.get()
        self.be.clean_data(self.cost, True)
        return self.cost
def get_cost ( self , inputs , targets ) : self . outputs [ : ] = self . costfunc ( inputs , targets ) self . be . mean ( self . outputs , axis = 1 , out = self . cost_buffer ) self . cost = self . cost_buffer . get ( ) self . be . clean_data ( self . cost , True ) return self . cost