Я новичок в API обнаружения объектов Tensorflow, но я пытаюсь обучить API модели на своем собственном наборе данных. Я следовал руководству Tensorflow по , работающему локально . Я пытаюсь обучить модель ssd_mobilenet_v1_ppn
с помощью следующей команды:
python object_detection/model_main.py --pipeline_config_path=object_detection/models/ssd_FMD/pipeline.config --model_dir=object_detection/models/ssd_FMD --num_train_steps=50000 --sample_1_of_n_eval_examples=1 --alsologtostderr
Я также пытался обучить модель с файлом train.py
в папке object_detection/legacy
, но я получил ту же ошибку. Я использую tenorflow-gpu 1.15.0, CUDA 10.0 и Python 3.7
Это ошибка, которую я получаю:
Traceback (most recent call last):
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 324, in _AssertCompatible
fn(values)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 276, in _check_not_tensor
_ = [_check_failed(v) for v in nest.flatten(values)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 277, in <listcomp>
if isinstance(v, ops.Tensor)]
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 248, in _check_failed
raise ValueError(v)
ValueError: Tensor("FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_pointwise/Relu6:0", shape=(512, 19, 19, 512), dtype=float32)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "object_detection/model_main.py", line 109, in <module>
tf.app.run()
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\platform\app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\DAP1804\AppData\Roaming\Python\Python37\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\DAP1804\AppData\Roaming\Python\Python37\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "object_detection/model_main.py", line 105, in main
tf.estimator.train_and_evaluate(estimator, train_spec, eval_specs[0])
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 473, in train_and_evaluate
return executor.run()
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 613, in run
return self.run_local()
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 714, in run_local
saving_listeners=saving_listeners)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 370, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1161, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1191, in _train_model_default
features, labels, ModeKeys.TRAIN, self.config)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1149, in _call_model_fn
model_fn_results = self._model_fn(features=features, **kwargs)
File "C:\Users\DAP1804\tensorflow\models\research\object_detection\model_lib.py", line 308, in model_fn
features[fields.InputDataFields.true_image_shape])
File "C:\Users\DAP1804\tensorflow\models\research\object_detection\meta_architectures\ssd_meta_arch.py", line 600, in predict
preprocessed_inputs)
File "C:\Users\DAP1804\tensorflow\models\research\object_detection\models\ssd_mobilenet_v1_ppn_feature_extractor.py", line 83, in extract_features
'image_features': image_features['Conv2d_11_pointwise']
File "C:\Users\DAP1804\tensorflow\models\research\object_detection\models\feature_map_generators.py", line 815, in pooling_pyramid_feature_maps
feature_map, [2, 2], padding='SAME', scope=feature_map_key)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\contrib\framework\python\ops\arg_scope.py", line 182, in func_with_args
return func(*args, **current_args)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\contrib\layers\python\layers\layers.py", line 2408, in max_pool2d
inputs = ops.convert_to_tensor(inputs)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1184, in convert_to_tensor
return convert_to_tensor_v2(value, dtype, preferred_dtype, name)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1242, in convert_to_tensor_v2
as_ref=False)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1297, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 286, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 227, in constant
allow_broadcast=True)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\constant_op.py", line 265, in _constant_impl
allow_broadcast=allow_broadcast))
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 449, in make_tensor_proto
_AssertCompatible(values, dtype)
File "C:\Users\DAP1804\anaconda3\envs\thesis\lib\site-packages\tensorflow_core\python\framework\tensor_util.py", line 328, in _AssertCompatible
raise TypeError("List of Tensors when single Tensor expected")
TypeError: List of Tensors when single Tensor expected
После нескольких дней поиска я не нашел решения пока нет. У кого-нибудь есть решение?