图 7.4:Finding out possible input node namesYou may wonder why we can't fix the `Not found: Op type not registered 'OneShotIterator'` error with a technique we used before, which is to first find out which source file contains the op using the command `grep 'REGISTER.*"OneShotIterator"' tensorflow/core/ops/*.cc`
(and you'll see the output as `tensorflow/core/ops/dataset_ops.cc:REGISTER_OP("OneShotIterator")`) then add `tensorflow/core/ops/dataset_ops.cc` to `tf_op_files.txt` and rebuild the TensorFlow library. Even if this were feasible, it would complicate the solution as now we need to feed the model with some data related to `OneShotIterator`, instead of the direct user drawing in points.
图 7.4:查找可能的输入节点名称
您可能想知道为什么我们不能使用我们之前使用的技术来解决`Not found: Op type not registered 'OneShotIterator'`错误,即先使用命令`grep 'REGISTER.*"OneShotIterator"' tensorflow/core/ops/*.cc`(您将看到输出为`tensorflow/core/ops/dataset_ops.cc:REGISTER_OP("OneShotIterator")`),然后将`tensorflow/core/ops/dataset_ops.cc`添加到`tf_op_files.txt`并重建 TensorFlow 库。 即使这可行,也会使解决方案复杂化,因为现在我们需要向模型提供一些与`OneShotIterator`相关的数据,而不是以点为单位的直接用户绘图。