$ python object_detection/builders/model_builder_test.py
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 "D:\tensorflow\models\research\object_detection\builders\model_builder.py", line 22, in <module>
from object_detection.builders import box_predictor_builder
File "D:\tensorflow\models\research\object_detection\builders\box_predictor_builder.py", line 20, in <module>
from object_detection.predictors import convolutional_box_predictor
File "D:\tensorflow\models\research\object_detection\predictors\convolutional_box_predictor.py", line 23, in <module>
slim = tf.contrib.slim
AttributeError: module 'tensorflow' has no attribute 'contrib'
$ python object_detection/builders/model_builder_test.py
C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Program Files\Python36\lib\site-packages\tensorflow\python\framework\dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.
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 "D:\tensorflow\models\research\object_detection\builders\model_builder.py", line 47, in <module>
from object_detection.models.ssd_mobilenet_edgetpu_feature_extractor import SSDMobileNetEdgeTPUFeatureExtractor
File "D:\tensorflow\models\research\object_detection\models\ssd_mobilenet_edgetpu_feature_extractor.py", line 19, in <module>
from object_detection.models import ssd_mobilenet_v3_feature_extractor
File "D:\tensorflow\models\research\object_detection\models\ssd_mobilenet_v3_feature_extractor.py", line 25, in <module>
from nets.mobilenet import mobilenet
File "D:\tensorflow\models\research\slim\nets\mobilenet\mobilenet.py", line 399, in <module>
def global_pool(input_tensor, pool_op=tf.compat.v2.nn.avg_pool2d):
AttributeError: module 'tensorflow._api.v1.compat' has no attribute 'v2'
Lucc@DESKTOP-97SHT0D MINGW64 /d/tensorflow/models/research (master)
$ python object_detection/builders/model_builder_test.py
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 "D:\tensorflow\models\research\object_detection\builders\model_builder.py", line 35, in <module>
from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res
File "D:\tensorflow\models\research\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 30, in <module>
from nets import inception_resnet_v2
File "D:\tensorflow\models\research\slim\nets\inception_resnet_v2.py", line 375, in <module>
batch_norm_updates_collections=tf.compat.v1.GraphKeys.UPDATE_OPS,
AttributeError: module 'tensorflow.compat' has no attribute 'v1'
目前找到的解决办法是pip install --upgrade tensorflow==1.14.0 -i https://pypi.douban.com/simple
- 点赞
- 收藏
- 分享
- 文章举报
发布了230 篇原创文章 · 获赞 192 · 访问量 60万+
他的留言板 关注