We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff96645 commit 2d1f54bCopy full SHA for 2d1f54b
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java
@@ -293,6 +293,16 @@ public Runner addTarget(Op op) {
293
return addTarget(op.op());
294
}
295
296
+ /**
297
+ * Make {@link #run} execute the graph's initializers.
298
+ *
299
+ * @return this session runner
300
+ */
301
+ public Runner doInitialization(){
302
+ graph.initializers().forEach(this::addTarget);
303
+ return this;
304
+ }
305
+
306
/**
307
* Set options (typically for debugging) for this run.
308
*
0 commit comments