def METHOD_NAME(self, inputs, is_infer=False):
    escm_model = ESCMLayer(
        self.sparse_feature_number, self.sparse_feature_dim,
        self.num_field, self.ctr_fc_sizes, self.cvr_fc_sizes,
        self.expert_num, self.expert_size, self.tower_size,
        self.counterfact_mode, self.feature_size)
    out_list = escm_model.forward(inputs[0:-2])
    ctr_out, ctr_out_one, cvr_out, cvr_out_one, ctcvr_prop, ctcvr_prop_one = out_list[
        0], out_list[1], out_list[2], out_list[3], out_list[4], out_list[5]
    ctr_clk = inputs[-2]
    ctcvr_buy = inputs[-1]
    ctr_num = paddle.sum(paddle.cast(ctr_clk, dtype="float32"), axis=0)
    O = paddle.cast(ctr_clk, 'float32')
    auc_ctr, batch_auc_ctr, auc_states_ctr = paddle.static.auc(
        input=ctr_out, label=ctr_clk)
    auc_ctcvr, batch_auc_ctcvr, auc_states_ctcvr = paddle.static.auc(
        input=ctcvr_prop, label=ctcvr_buy)
    auc_cvr, batch_auc_cvr, auc_states_cvr = paddle.static.auc(
        input=cvr_out, label=ctcvr_buy)
    if is_infer:
        fetch_dict = {
            'auc_ctr': auc_ctr,
            'auc_cvr': auc_cvr,
            'auc_ctcvr': auc_ctcvr
        }
        return fetch_dict
    loss_ctr = paddle.nn.functional.log_loss(
        input=ctr_out_one, label=paddle.cast(
            ctr_clk, dtype="float32"))
    loss_cvr = paddle.nn.functional.log_loss(
        input=cvr_out_one, label=paddle.cast(
            ctcvr_buy, dtype="float32"))
    if self.counterfact_mode == "DR":
        loss_cvr = self.counterfact_dr(loss_cvr, O, ctr_out_one,
                                       out_list[6])
    else:
        loss_cvr = self.counterfact_ipw(loss_cvr, ctr_num, O, ctr_out_one)
    loss_ctcvr = paddle.nn.functional.log_loss(
        input=ctcvr_prop_one,
        label=paddle.cast(
            ctcvr_buy, dtype="float32"))
    cost = loss_ctr + loss_cvr * self.counterfactual_w + loss_ctcvr * self.global_w
    avg_cost = paddle.mean(x=cost)
    self._cost = avg_cost
    fetch_dict = {
        'cost': avg_cost,
        'auc_ctr': auc_ctr,
        'auc_cvr': auc_cvr,
        'auc_ctcvr': auc_ctcvr
    }
    return fetch_dict