Unverified Commit cd098e42 authored by Harikrishna KP's avatar Harikrishna KP Committed by GitHub
Browse files

fix: correct FusedAdam copy-paste in FusedSGD error messages (#2675)



fix: correct copy-paste error messages in FusedSGD
Signed-off-by: default avatarMr-Neutr0n <64578610+Mr-Neutr0n@users.noreply.github.com>
parent 33ca6150
......@@ -123,7 +123,7 @@ class FusedSGD(Optimizer):
self.set_grad_none = set_grad_none
if self.set_grad_none is not None:
warnings.warn(
"set_grad_none kwarg in FusedAdam constructor is deprecated. "
"set_grad_none kwarg in FusedSGD constructor is deprecated. "
"Use set_to_none kwarg in zero_grad instead.",
DeprecationWarning,
)
......@@ -147,7 +147,7 @@ class FusedSGD(Optimizer):
if set_to_none is not None and set_to_none != self.set_grad_none:
raise ValueError(
f"Called zero_grad with set_to_none={set_to_none}, "
f"but FusedAdam was initialized with set_grad_none={self.set_grad_none}"
f"but FusedSGD was initialized with set_grad_none={self.set_grad_none}"
)
set_to_none = self.set_grad_none
if set_to_none is None:
......
Markdown is supported
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