解决报错:test_create_ssd_models_from_config+missing 2 required positional arguments: 'inputs' and 'out‘

  • 如果你在 做TensorFlow之目标检测API接口调试,报错:ERROR:test_create_ssd_models_from_config+missing 2 required positional arguments: ‘inputs’ and 'out‘
  • 请检测你的tensorflow和protoc的版本
  • 报错原因:tensorflow版本1.5 ------protoc的版本3.3
  • 解决办法:pip install tensorflow-gpu==1.8,即升级tensorflow版本
  • 如果还没解决,请尝试其他版本
ERROR: test_create_ssd_models_from_config (__main__.ModelBuilderTest)
test_create_ssd_models_from_config (__main__.ModelBuilderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 203, in test_create_ssd_models_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/home/muli/Faster-R-CNN/models/research/object_detection/builders/model_builder.py", line 121, in build
    return _build_ssd_model(model_config.ssd, is_training, add_summaries)
  File "/home/muli/Faster-R-CNN/models/research/object_detection/builders/model_builder.py", line 244, in _build_ssd_model
    is_training=is_training)
  File "/home/muli/Faster-R-CNN/models/research/object_detection/builders/model_builder.py", line 220, in _build_ssd_feature_extractor
    return feature_extractor_class(**kwargs)
  File "/home/muli/Faster-R-CNN/models/research/object_detection/models/ssd_mobilenet_v1_keras_feature_extractor.py", line 86, in __init__
    name=name)
  File "/home/muli/Faster-R-CNN/models/research/object_detection/meta_architectures/ssd_meta_arch.py", line 180, in __init__
    super(SSDKerasFeatureExtractor, self).__init__(name=name)
TypeError: __init__() missing 2 required positional arguments: 'inputs' and 'outputs'

----------------------------------------------------------------------
Ran 16 tests in 0.028s

FAILED (errors=1)

解决报错:test_create_ssd_models_from_config+missing 2 required positional arguments: 'inputs' and 'out‘_第1张图片

你可能感兴趣的:(python)