YunYang1994 / tensorflow-yolov3

🔥 TensorFlow Code for technical report: "YOLOv3: An Incremental Improvement"

Home Page:https://yunyang1994.gitee.io/2018/12/28/YOLOv3-算法的一点理解/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

按照readme安装好环境,执行convert_weight.py报错,请各位高手指教,谢谢!

junlintianxiatjm opened this issue · comments

2021-01-20 17:01:33.778610: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "D:/python-workspace/tensorflow-yolov3-master/convert_weight.py", line 30, in
load = tf.train.import_meta_graph(org_weights_path + '.meta')
AttributeError: module 'tensorflow._api.v2.train' has no attribute 'import_meta_graph'

tensorflow版本过高,降低版本就行了:
#import tensorflow as tf
import tensorflow.compat.v1 as tf
tf.compat.v1.disable_eager_execution()