Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Object Training Tensor-flow Error

I want to train set of images according to my research. by following this tutorial ends up with an error. this is the tutorial i`m following. Tutorial

Im implementing this project in python 3.6, tensorflow latest and its CPU version, while i`m running the execution to train the model according to the tutorial it gives an error like this.

    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:\tensorflow1\models\research\object_detection\core\box_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:\tensorflow1\models\research\object_detection\core\losses.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:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.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:\tensorflow1\models\research\object_detection\trainer.py", line 284, in train
        train_config.optimizer)
      File "C:\tensorflow1\models\research\object_detection\builders\optimizer_builder.py", line 50, in build
        learning_rate = _create_learning_rate(config.learning_rate)
      File "C:\tensorflow1\models\research\object_detection\builders\optimizer_builder.py", line 109, in _create_learning_rate
        learning_rate_sequence, config.warmup)
      File "C:\tensorflow1\models\research\object_detection\utils\learning_schedules.py", line 156, in manual_stepping
        raise ValueError('First step cannot be zero.')
    ValueError: First step cannot be zero.

Why i`m getting this kind of a error? please help me to fix this.

like image 790
D.Anush Avatar asked May 04 '26 00:05

D.Anush


1 Answers

I found a fix for this here:

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

Basically, take this code out of your training/faster_rcnn_inception_v2_pets.config (or whatever you've named it) file:

schedule {
   step: 0
   learning_rate: .0001
}

If you're looking for that exact text you might not find it, in my code it was learning_rate: .0002. Anyway, hope that helps.

like image 176
slim Avatar answered May 06 '26 13:05

slim