diff --git a/python/paddle/optimizer/adamw.py b/python/paddle/optimizer/adamw.py index 4e3990952c6cc0dea3638552c63c14213a31f9b3..6f61e5ddd5b7ca055cdad30455b51f1ee40ce810 100644 --- a/python/paddle/optimizer/adamw.py +++ b/python/paddle/optimizer/adamw.py @@ -182,6 +182,8 @@ class AdamW(Optimizer): if ( not core.is_compiled_with_cuda() and not core.is_compiled_with_xpu() + and paddle.device.get_device().split(":")[0] + not in paddle.device.get_all_custom_device_type() ): raise NotImplementedError("'lr_ratio' is unimplemented in CPU.")