Обучите модуль обнаружения объектов с помощью TensorFlow

#python #tensorflow

#python #tensorflow

Вопрос:

Когда я выполняю следующую команду для обучения модели с использованием tenserflow, я получил следующие ошибки.

Команда :

 python legacy/train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
  

Ошибки :

 D:Anacondaenvstf1.12libsite-packagestensorflowpythonframeworkdtypes.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)])
D:Anacondaenvstf1.12libsite-packagestensorflowpythonframeworkdtypes.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)])
D:Anacondaenvstf1.12libsite-packagestensorflowpythonframeworkdtypes.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)])
D:Anacondaenvstf1.12libsite-packagestensorflowpythonframeworkdtypes.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)])
D:Anacondaenvstf1.12libsite-packagestensorflowpythonframeworkdtypes.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)])
D:Anacondaenvstf1.12libsite-packagestensorflowpythonframeworkdtypes.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)])
Traceback (most recent call last):
  File "legacy/train.py", line 51, in <module>
    from object_detection.builders import dataset_builder
  File "D:tf1.12modelresearchobject_detectionbuildersdataset_builder.py", line 32, in <module>
    from object_detection.builders import decoder_builder
  File "D:tf1.12modelresearchobject_detectionbuildersdecoder_builder.py", line 25, in <module>
    from object_detection.data_decoders import tf_example_decoder
  File "D:tf1.12modelresearchobject_detectiondata_decoderstf_example_decoder.py", line 28, in <module>
    from tf_slim import tfexample_decoder as slim_example_decoder
ModuleNotFoundError: No module named 'tf_slim'
  

Итак, как я могу это исправить?

Ответ №1:

Вероятно, пакет tf-slim не установлен в вашей среде python. Попробуйте выполнить приведенную ниже команду в командной строке conda

 pip install tf-slim