
    def __init__(self, optimizer, epsilon=1e-05, hyperpara=0.001, weight_decay=0.0, use_clip=False,
                 decay_filter=lambda x: 'LayerNorm' not in x.name and 'bias' not in x.name,
                 lars_filter=lambda x: 'LayerNorm' not in x.name and 'bias' not in x.name, loss_scale=1.0):
        super(LARS, self).__init__(0.0, [Parameter(Tensor(0.0), name="trivial")])
        self.opt = optimizer
        self.parameters = optimizer.parameters
        self.learning_rate = optimizer.learning_rate
        self.lars = P.LARSUpdate(epsilon, hyperpara, use_clip)
        self.reciprocal_scale = 1.0 / loss_scale