def METHOD_NAME(self, pred, label):
    cost = paddle.nn.functional.binary_cross_entropy(
        # cost = paddle.nn.functional.log_loss(
        input=pred,
        label=paddle.cast(
            label, dtype="float32"))
    avg_cost = paddle.mean(x=cost)
    return avg_cost