def METHOD_NAME(self, strategy=None):
    pure_bf16 = self.config.get("pure_bf16")
    lr = float(self.config.get("hyper_parameters.optimizer.learning_rate"))
    decay_rate = float(
        self.config.get("hyper_parameters.optimizer.decay_rate"))
    decay_steps = int(
        self.config.get("hyper_parameters.optimizer.decay_steps"))
    # single
    optimizer = paddle.optimizer.SGD(
        learning_rate=paddle.static.exponential_decay(
            learning_rate=lr,
            decay_steps=decay_steps,
            decay_rate=decay_rate,
            staircase=True))
    if strategy != None:
        sync_mode = self.config.get("runner.sync_mode")
        print("sync_mode: {}".format(sync_mode))
        # geo
        if sync_mode == "geo":
            decay_steps = int(decay_steps / fleet.worker_num())
            optimizer = paddle.optimizer.SGD(
                learning_rate=paddle.static.exponential_decay(
                    learning_rate=lr,
                    decay_steps=decay_steps,
                    decay_rate=decay_rate,
                    staircase=True))
        # async sync heter
        if sync_mode in ["async", "sync", "heter"]:
            print("decay_steps: {}".format(decay_steps))
            scheduler = paddle.optimizer.lr.ExponentialDecay(
                learning_rate=lr, gamma=decay_rate, verbose=True)
            optimizer = paddle.optimizer.SGD(scheduler)
            strategy.a_sync_configs = {"lr_decay_steps": decay_steps}
        optimizer = fleet.distributed_optimizer(optimizer, strategy)
    if pure_bf16:
        optimizer = paddle.static.amp.bf16.decorate_bf16(
            optimizer, use_bf16_guard=False, use_pure_bf16=pure_bf16)
    self.optimizer = optimizer
    self.optimizer.minimize(self.cost)