(self, inputs, targets, cost_type=None)
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.
            cost_type (String, default None): Cost type for GAN models

        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, cost_type=None):
        """
        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.
            cost_type (String, default None): Cost type for GAN models

        Returns:
            Tensor containing cost

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