得到“ ValueError:边界中的条目必须严格增加”。 ,在训练期间使用tensorflow对象检测API

时间:2019-08-30 02:13:51

标签: python tensorflow object-detection

我试图使用tensorflow对象检测API训练自己的数据集。因此,为此,我首先使用labelImg标记了数据集。由此,我得到了一个带有标签信息的xml文件。然后,我使用脚本将这些数据转换为tfrecord。当我尝试使用更快的rasnet inception v2模型进行迁移学习时,我根据自己的信息更改了fast_rcnn_inception_v2_pets.config。最后,我运行model_main.py训练我的数据。但是出现以下值错误。

Traceback (most recent call last):
  File "model_main.py", line 109, in <module>
    tf.app.run()
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "model_main.py", line 105, in main
    tf.estimator.train_and_evaluate(estimator, train_spec, eval_specs[0])
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/training.py", line 473, in train_and_evaluate
    return executor.run()
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/training.py", line 613, in run
    return self.run_local()
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/training.py", line 714, in run_local
    saving_listeners=saving_listeners)
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 367, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1158, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1188, in _train_model_default
    features, labels, ModeKeys.TRAIN, self.config)
  File "/home/mahbubcseju/anaconda3/envs/kashem/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1146, in _call_model_fn
    model_fn_results = self._model_fn(features=features, **kwargs)
  File "/home/mahbubcseju/Desktop/Astro/models/research/object_detection/model_lib.py", line 374, in model_fn
    train_config.optimizer)
  File "/home/mahbubcseju/Desktop/Astro/models/research/object_detection/builders/optimizer_builder.py", line 56, in build
    global_step=global_step)
  File "/home/mahbubcseju/Desktop/Astro/models/research/object_detection/builders/optimizer_builder.py", line 124, in _create_learning_rate
    learning_rate_sequence, config.warmup)
  File "/home/mahbubcseju/Desktop/Astro/models/research/object_detection/utils/learning_schedules.py", line 187, in manual_stepping
    raise ValueError('Entries in boundaries must be strictly increasing.')
ValueError: Entries in boundaries must be strictly increasing

如何摆脱此错误。迫切需要一些建议。

0 个答案:

没有答案