Skip to content
Snippets Groups Projects
Unverified Commit 1c350a34 authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!2725 fix gpu benchmark

Merge pull request !2725 from chujinjin/fix_gpu_benchmark
parents 3c36e880 4303188d
No related branches found
No related tags found
No related merge requests found
# Copyright 2021 Huawei Technologies Co., Ltd
# Copyright 2021-2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -139,7 +139,7 @@ class Momentum(Optimizer):
weight_decay = Tensor(0.0, ms.float32)
scale = Tensor(1.0, ms.float32)
if self.exec_weight_decay:
weight_decay = self.weight_decay_tensor
weight_decay = self.weight_decay
if self.need_scale:
scale = self.reciprocal_scale
lr = self.get_lr()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment