-
Notifications
You must be signed in to change notification settings - Fork 45.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value Error: First Step Cannot Be Zero #3794
Comments
We recently updated the code so this block
is not recognized anymore. The model configs in model zoo still have this block so it crashed the program. You can remove this block or use the latest config instead of the downloaded one in tar.gz file. |
@pkulzc removing the block is no good , it still throws no variables to save error . |
@vishalgolcha could you share more details? |
What is the top-level directory of the model you are using: Object_detection i am trying to finetune a faster rcnn inception model for a custom tfrecord file , the traceback it shows is |
You're using the wrong file for checkpoint. Use this: |
i have the same error . and i can find where is the block.could you please tell me ? |
It's in the config file, train_config/optimizer/learning_rate. |
thank you for your reply
… 在 2018年4月5日,下午11:48,pkulzc ***@***.***> 写道:
It's in the config file, train_config/optimizer/learning_rate.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Mr. pkulzc pls be more specific :
|
An simpler way is to always use the config here instead of the ones in downloaded file. For example, If you want to train a faster_rcnn_resnet101_kitti model, use models/research/object_detection/samples/configs/faster_rcnn_resnet101_kitti.config instead of the one in the downloaded compressed file. The configs in git repo are guaranteed to be latest. |
Thank you the issue resolved but coming up with new error (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config |
@Shiv1799 apparently the config file is missing a "}" , you will want to check it. |
hi @pkulzc what file should i set to the "fine_tune_checkpoint:" value in my file example.config ? currently my example.config looks like this :
|
@antoine29 you should use "...trained_model/model.ckpt". I'm closing this bug since it's straightforward and has been answered. |
(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py -- Traceback (most recent call last): Getting this error anyone who can help with this?? |
After resolving the first step cannot be zero, I encountered this problem below. (tensorflow) C:\Users\User\Documents\GitHub\models-master\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Future major versions of TensorFlow will allow gradients to flow See @{tf.nn.softmax_cross_entropy_with_logits_v2}. Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Any one familiar with this? |
@osama191 i have the same problem. Do you fix it ? Help me please WARNING:tensorflow:From /home/luiz/model_ssd/research/object_detection/trainer.py:262: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. I did put the "prints" in the function above Tensor("global_step:0", shape=(), dtype=int64_ref, device=/device:CPU:0) dt None name ref ref True print('comap', dtype.is_compatible_with(t.dtype)) |
A complete answer: The issue is that
A fix is to delete this block and changing |
@pkulzc there are like 3 blocks for schedule, which one? |
I am getting this error (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py -- Traceback (most recent call last): Can anyone explain why I am getting this error? |
1 similar comment
I am getting this error (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py -- Traceback (most recent call last): Can anyone explain why I am getting this error? |
When I according to the suggestion of @pkulzc to remove that block, the problem can be solved, however, a new problem is followed, which is: File "D:\Anaconda2\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\script_ops.py", line 158, in call File "D:\tensorflow1\models\research\object_detection\metrics\coco_evaluation.py", line 346, in first_value_func File "D:\tensorflow1\models\research\object_detection\metrics\coco_evaluation.py", line 212, in evaluate File "D:\tensorflow1\models\research\object_detection\metrics\coco_tools.py", line 236, in ComputeMetrics File "D:\tensorflow1\models\research\pycocotools\cocoeval.py", line 156, in evaluate File "D:\tensorflow1\models\research\pycocotools\cocoeval.py", line 158, in File "D:\tensorflow1\models\research\pycocotools\cocoeval.py", line 264, in evaluateImg TypeError: object of type 'NoneType' has no len() I hope you can give me some ways to solve it, thanks very much! |
I deleted the block : WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
WARNING:tensorflow:From /home/user/anaconda3/lib/python3.7/site-packages/tensorflow/python/platform/app.py:125: main (from main) is deprecated and will be removed in a future version. Future major versions of TensorFlow will allow gradients to flow See /home/user/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/gradients_impl.py:110: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory. |
#tessor flow custom training ERROR:raise ValueError('First step cannot be zero.') ValueError: First step cannot be zero. SOLUTION: object_detection\training\ .config train_config: { |
Updated training/faster_rcnn_inception_v2_pets.config due to updates at Tensorflow Object Detection API. Thank you for the tutorial with great details! Tried following it and training crashed with the following error: raise ValueError('First step cannot be zero.') Turns out they updated the code- tensorflow/models#3794
Hello
|
hello so here I try to train a model of mask r cnn on my own give with the command but i get the following error
could someone guided me please |
Helloo i have errors while running model_main_tf2.py. I searched for 6 days to find a solution. Im so new to this topic and couldnt solve the problems. I would be so appreciate if you help me. these are my config and other files that i use here |
When running the faster_rcnn_resnet101_kitti_2018_01_28 model it is throwing the error:
The text was updated successfully, but these errors were encountered: