Skip to content

Commit 492d43e

Browse files
authored
fix that parameters'grad has grad var (#29440)
1 parent c14d2c6 commit 492d43e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/imperative/variable_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class VariableWrapper {
8181
}
8282

8383
bool IsLeafGrad() const {
84-
if (!HasGradVar() && !HasGradNode() && !OverridedStopGradient()) {
84+
if (!HasGradNode() && !OverridedStopGradient()) {
8585
return true;
8686
}
8787
return false;

0 commit comments

Comments
 (0)