aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/ops/while_loop.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/cc/ops/while_loop.h')
-rw-r--r--tensorflow/cc/ops/while_loop.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/cc/ops/while_loop.h b/tensorflow/cc/ops/while_loop.h
index 82181516d6..a04476056a 100644
--- a/tensorflow/cc/ops/while_loop.h
+++ b/tensorflow/cc/ops/while_loop.h
@@ -49,7 +49,12 @@ typedef std::function<Status(const Scope&, const std::vector<Output>& inputs,
// * outputs: output param that returns final loop variable outputs in non-error
// case. Must be non-null and empty.
// * create_while_ctx: if true, a WhileContext is created and populated for this
-// loop. See core/graph/while_context.h for more details.
+// loop. See core/graph/while_context.h for more details on
+// WhileContexts. This is set to false for loops used as part of gradient
+// computations, since they're part of the gradient for a loop in the
+// forward-pass.
+// TODO(skyewm): revisit this. Should we create WhileContexts for all loops,
+// even if we don't need them?
// * cond_output: if non-null, the output of the predicate is returned. This
// will always be a LoopCond node.
//