Skip to content

Commit ac347fc

Browse files
authored
add more error info for these ops without double grad ops. (#25989)
1 parent 50c6885 commit ac347fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

paddle/fluid/imperative/partial_grad_engine.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,10 @@ void PartialGradTask::RunEachOp(OpBase *op) {
887887
op->Attrs(), op->place());
888888
PADDLE_ENFORCE_NOT_NULL(
889889
double_grad_node,
890-
platform::errors::NotFound("The Op %s doesn't have any grad op.",
890+
platform::errors::NotFound("The Op %s doesn't have any grad op. If you "
891+
"don't intend calculating higher order "
892+
"derivatives, please set `create_graph` to "
893+
"False.",
891894
op->Type()));
892895
VLOG(10) << "Create " << double_grad_node->size()
893896
<< " double grad op(s) for " << op->Type()

0 commit comments

Comments
 (0)