系统信息
Windows 10 TensorFlow版本2.0.0 虚拟环境中的Python 3.6.9 CUDA / cuDNN:是 GPU型号和内存:GTX1080Ti,11GB
我尝试运行python main_model.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
,但由于属性错误而无法执行。继承人显示的错误:
Traceback (most recent call last):
File "model_main.py",line 26,in <module>
from object_detection import model_lib
File "C:\tensorflow1\models\research\object_detection\model_lib.py",line 27,in <module>
from object_detection import eval_util
File "C:\tensorflow1\models\research\object_detection\eval_util.py",line 40,in <module>
slim = tf.contrib.slim
AttributeError: module 'tensorflow' has no attribute 'contrib'
我对https://github.com/tensorflow/tensorflow/issues/33442做了一些研究 并告诉我最好的方法,使用此链接寻找替代方法:https://github.com/tensorflow/addons
说实话,我对此还很陌生,不知道该如何替换tensorflow 2.0.0中的contrib
中的教程实际结果应该能够正确训练数据