自定义对象训练张量流错误



我想根据我的研究训练一组图像。 按照本教程结束,最终会出现错误。 这是我正在遵循的教程。教程

我在python 3.6,tensorflow最新版及其CPU版本中实现该项目,而我正在根据教程运行执行以训练模型,它给出了这样的错误。

Instructions for updating:
Please switch to tf.train.create_global_step
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:depth of additional conv before box predictor: 0
WARNING:tensorflow:From C:tensorflow1modelsresearchobject_detectioncorebox_predictor.py:403: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
INFO:tensorflow:Scale of 0 disables regularizer.
WARNING:tensorflow:From C:tensorflow1modelsresearchobject_detectioncorelosses.py:317: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See @{tf.nn.softmax_cross_entropy_with_logits_v2}.
Traceback (most recent call last):
File "train.py", line 167, in <module>
tf.app.run()
File "C:Anacondaenvstensorflowlibsite-packagestensorflowpythonplatformapp.py", line 126, in run
_sys.exit(main(argv))
File "train.py", line 163, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "C:tensorflow1modelsresearchobject_detectiontrainer.py", line 284, in train
train_config.optimizer)
File "C:tensorflow1modelsresearchobject_detectionbuildersoptimizer_builder.py", line 50, in build
learning_rate = _create_learning_rate(config.learning_rate)
File "C:tensorflow1modelsresearchobject_detectionbuildersoptimizer_builder.py", line 109, in _create_learning_rate
learning_rate_sequence, config.warmup)
File "C:tensorflow1modelsresearchobject_detectionutilslearning_schedules.py", line 156, in manual_stepping
raise ValueError('First step cannot be zero.')
ValueError: First step cannot be zero.

为什么我会收到这种错误? 请帮我解决这个问题。

我在这里找到了解决此问题的方法:

https://github.com/tensorflow/models/issues/3794

基本上,从你的 training/faster_rcnn_inception_v2_pets.config(或任何你命名的(文件中取出这段代码:

schedule {
step: 0
learning_rate: .0001
}

如果你正在寻找确切的文本,你可能找不到它,在我的代码中它是learning_rate:.0002。无论如何,希望有帮助。

相关内容

最新更新