我正在使用TF对象检测API来训练一个模型,我最终将使用tf服务来部署该模型。我计划获取这个网络的输出(在中间CNN层),并为除对象检测之外的其他功能构建额外的网络。我计划在TF 2.0中开发新的网络。然而,为了使其顺利运行,(我怀疑)对象检测API将需要更新以支持TF-2.0。
是否有计划将TF API更新为TF-2.0?
我试着运行model_builder_test,但是它失败了,如下所示,因为tensorflow 2.0不再支持contrib。
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 23, in <module>
from object_detection.builders import model_builder
File "/models/research/object_detection/builders/model_builder.py", line 19, in <module>
from object_detection.builders import box_predictor_builder
File "/models/research/object_detection/builders/box_predictor_builder.py", line 18, in <module>
from object_detection.core import box_predictor
File "/research/object_detection/core/box_predictor.py", line 35, in <module>
slim = tf.contrib.slim
AttributeError: module 'tensorflow' has no attribute 'contrib'
发布于 2019-04-27 07:52:19
Tensorflow 2.0还在Alpha中。幸运的是,最终将增加对Tensorflow 2.0的支持。参见此问题
发布于 2019-08-09 10:47:20
是的,有一个将对象检测API迁移到TF2.0的计划,但这需要几个月的时间。同时,请使用TF1.x作为API。
https://stackoverflow.com/questions/55715168
复制