diff --git a/test/prim/model/test_resnet_cinn.py b/test/prim/model/test_resnet_cinn.py index db20dc5a605e1e6ecbf9771bc012b74ededfde92..963b311b5b0985628c64f82f1f5148574c5be878 100644 --- a/test/prim/model/test_resnet_cinn.py +++ b/test/prim/model/test_resnet_cinn.py @@ -75,7 +75,7 @@ def optimizer_setting(parameter_list=None): optimizer = fluid.optimizer.Momentum( learning_rate=base_lr, momentum=momentum_rate, - regularization=fluid.regularizer.L2Decay(l2_decay), + regularization=paddle.regularizer.L2Decay(l2_decay), parameter_list=parameter_list, ) diff --git a/test/prim/model/test_resnet_prim.py b/test/prim/model/test_resnet_prim.py index 79c169c2272b3a02c4ae785d21da36ed29f01463..d55f795286a4e430d2de130aaba557e599196040 100644 --- a/test/prim/model/test_resnet_prim.py +++ b/test/prim/model/test_resnet_prim.py @@ -75,7 +75,7 @@ def optimizer_setting(parameter_list=None): optimizer = fluid.optimizer.Momentum( learning_rate=base_lr, momentum=momentum_rate, - regularization=fluid.regularizer.L2Decay(l2_decay), + regularization=paddle.regularizer.L2Decay(l2_decay), parameter_list=parameter_list, )