Hi everyone!
I’ve been having this warning in the browser console:
“This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.”
So I have switched from .executeAsync
to .execute
and effectively the warning goes away. If I open
the TF.js documentation for executeAsync
from: TensorFlow.js API
it reads: “…use this method when your model contains control flow ops.”
Now my problem is that I don’t really know beforehand if the model that I’m working with has or does
not have control flow. So, is there a way after calling tf.loadGraphModel
to effectively test
if I can call execute
instead of executeAsync
?
I’ve checked the warning in the source code but it seems to me that this test is buried deep
inside the TF.js internals, I can see it at line 581 from tfjs-converter/src/executor/graph_executor.ts
that the test does: if (dynamicNode == null && !isFunctionExecution) { ... }
to issue the warning to the console.
Thanks in advance,
Lucas.