1$ python object_detection/builders/model_builder_test.py 2Traceback (most recent call last): 3 File "object_detection/builders/model_builder_test.py", line 23, in <module> 4 from object_detection.builders import model_builder 5 File "D:\tensorflow\models\research\object_detection\builders\model_builder.py", line 22, in <module> 6 from object_detection.builders import box_predictor_builder 7 File "D:\tensorflow\models\research\object_detection\builders\box_predictor_builder.py", line 20, in <module> 8 from object_detection.predictors import convolutional_box_predictor 9 File "D:\tensorflow\models\research\object_detection\predictors\convolutional_box_predictor.py", line 23, in <module> 10 slim = tf.contrib.slim 11AttributeError: module 'tensorflow' has no attribute 'contrib' 12 13 14$ python object_detection/builders/model_builder_test.py 15C:\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'. 16 _np_qint8 = np.dtype([("qint8", np.int8, 1)]) 17C:\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'. 18 _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) 19C:\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'. 20 _np_qint16 = np.dtype([("qint16", np.int16, 1)]) 21C:\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'. 22 _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) 23C:\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'. 24 _np_qint32 = np.dtype([("qint32", np.int32, 1)]) 25C:\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'. 26 np_resource = np.dtype([("resource", np.ubyte, 1)]) 27 28WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. 29For more information, please see: 30 * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md 31 * https://github.com/tensorflow/addons 32If you depend on functionality not listed there, please file an issue. 33 34Traceback (most recent call last): 35 File "object_detection/builders/model_builder_test.py", line 23, in <module> 36 from object_detection.builders import model_builder 37 File "D:\tensorflow\models\research\object_detection\builders\model_builder.py", line 47, in <module> 38 from object_detection.models.ssd_mobilenet_edgetpu_feature_extractor import SSDMobileNetEdgeTPUFeatureExtractor 39 File "D:\tensorflow\models\research\object_detection\models\ssd_mobilenet_edgetpu_feature_extractor.py", line 19, in <module> 40 from object_detection.models import ssd_mobilenet_v3_feature_extractor 41 File "D:\tensorflow\models\research\object_detection\models\ssd_mobilenet_v3_feature_extractor.py", line 25, in <module> 42 from nets.mobilenet import mobilenet 43 File "D:\tensorflow\models\research\slim\nets\mobilenet\mobilenet.py", line 399, in <module> 44 def global_pool(input_tensor, pool_op=tf.compat.v2.nn.avg_pool2d): 45AttributeError: module 'tensorflow._api.v1.compat' has no attribute 'v2' 46 47Lucc@DESKTOP-97SHT0D MINGW64 /d/tensorflow/models/research (master) 48$ python object_detection/builders/model_builder_test.py 49Traceback (most recent call last): 50 File "object_detection/builders/model_builder_test.py", line 23, in <module> 51 from object_detection.builders import model_builder 52 File "D:\tensorflow\models\research\object_detection\builders\model_builder.py", line 35, in <module> 53 from object_detection.models import faster_rcnn_inception_resnet_v2_feature_extractor as frcnn_inc_res 54 File "D:\tensorflow\models\research\object_detection\models\faster_rcnn_inception_resnet_v2_feature_extractor.py", line 30, in <module> 55 from nets import inception_resnet_v2 56 File "D:\tensorflow\models\research\slim\nets\inception_resnet_v2.py", line 375, in <module> 57 batch_norm_updates_collections=tf.compat.v1.GraphKeys.UPDATE_OPS, 58AttributeError: module 'tensorflow.compat' has no attribute 'v1'
目前找到的解决办法是pip install --upgrade tensorflow==1.14.0 -i https://pypi.douban.com/simple
- 点赞
- 收藏
- 分享
-
- 文章举报
发布了230 篇原创文章 · 获赞 192 · 访问量 60万+
他的留言板 关注
