0

我正在关注 lpot 的这个 github(https://github.com/intel/lpot/tree/master/examples/tensorflow/object_detection),在下载数据集的第 5 步中,我收到以下错误。无法继续。

HEAD is now at 7a9934df Merged commit includes the following changes: 184048729  by Zhichao Lu:
Traceback (most recent call last):
  File "./object_detection/dataset_tools/create_coco_tf_record.py", line 46, in <module>
    flags = tf.app.flags
AttributeError: module 'tensorflow' has no attribute 'app'
mv: cannot stat '/root/lpot/examples/tensorflow/object_detection/data/coco_testdev.record*': No such file or directory
mv: cannot stat '/root/lpot/examples/tensorflow/object_detection/data/coco_train.record*': No such file or directory
mv: cannot stat '/root/lpot/examples/tensorflow/object_detection/data/coco_val.record*': No such file or directory

提前致谢。

4

1 回答 1

0

如果是 tensorflow 2.0 或更高版本,则 create_coco_tf_record.py 代码中的微小更改将解决您的问题。将 import tensorflow as tf替换为 import tensorflow.compat.v1 as tf

问候,

贾纳尼·钱德兰

于 2021-09-16T06:05:48.987 回答