-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted []. #11
Comments
It's easy. Go to the utils folder. Find the learning_schedules.py file. Go to the line 167. And replace the line 167 with below
|
Thanks epratheeban! gharis, please re-open this issue if that did not fix the problem. |
sir can you please help me with this am getting this 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 (tensorflow1) C:\tensorflow1\models\research\object_detection> |
WARNING:tensorflow:From C:\Users\fahad\Anaconda3\envs\tensorflow1\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version. 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): (tensorflow1) C:\tensorflow1\models\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): i go this error then i did like (epratheeban ) i changed 167 line then i got another error Traceback (most recent call last): please help me i need it sooooooo bad |
see this solution here: #3705 (comment) |
(tensorflow1) C:\tensorflow1\models\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): (tensorflow1) C:\tensorflow1\models\research\object_detection> I got this error when I run the trainning. |
C:\models-master\research\object_detection\legacy>python train.py --logtostderr --train_dir=../training/ --pipeline_config_path=../training/ssd_mobilenet_v2_coco.config During handling of the above exception, another exception occurred: Traceback (most recent call last): getting this error upon running train.py..... can anyone giude me please??? |
I got the below error when I hit python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Traceback (most recent call last): Appreciate your help thanks |
did you find out how to solve your error @gnanimail |
the same problem here seems unmitigated error ???? |
Hi, that was a great tutorial on implementing the API for custom object detection but unfortunately i'm stuck in step 6 i.e, training the rcnn. When i ran the command for training i'm getting the following exceptions. Can you please help me to sort it. During handling of the above exception, another exception occurred: Traceback (most recent call last): |
from object_detection.protos import calibration_pb2 as object__detection_dot_protos_dot_calibration__pb2 ImportError: cannot import name 'calibration_pb2' from 'object_detection.protos' (C:\Anaconda3\lib\site-packages\object_detection-0.1-py3.7.egg\object_detection\protos_init_.py) |
I have the same problem but i think it's because of the init.py which is empty |
can anyone help me with the below error, please? (base) C:\WINDOWS\system32>cd C:/tensorflow1\models\research\object_detection (base) C:\tensorflow1\models\research\object_detection>activate tensorflow1 (tensorflow1) C:\tensorflow1\models\research\object_detection>python legacy\train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config (tensorflow1) C:\tensorflow1\models\research\object_detection> |
Hi there, (tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipline_config_path=training/faster_rcnn_inception_v2_pets.config WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
Traceback (most recent call last): please help |
(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Scale of 0 disables regularizer.
WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\trainer.py:228: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
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:396: 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
WARNING:tensorflow:From C:\tensorflow1\models\research\object_detection\core\losses.py:316: 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 "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 510, in _apply_op_helper
preferred_dtype=default_dtype)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\ops.py", line 1036, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\constant_op.py", line 235, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\constant_op.py", line 214, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 442, in make_tensor_proto
_GetDenseDimensions(values)))
ValueError: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 524, in _apply_op_helper
values, as_ref=input_arg.is_ref).dtype.name
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\ops.py", line 1036, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\constant_op.py", line 235, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\constant_op.py", line 214, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 442, in make_tensor_proto
_GetDenseDimensions(values)))
ValueError: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 167, in
tf.app.run()
File "C:\anaconda\envs\tensorflow1\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 255, 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 169, in manual_stepping
[0] * num_boundaries))
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\array_ops.py", line 2619, in where
return gen_math_ops._select(condition=condition, x=x, y=y, name=name)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 4503, in _select
"Select", condition=condition, t=x, e=y, name=name)
File "C:\anaconda\envs\tensorflow1\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 528, in _apply_op_helper
(input_name, err))
ValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].
(tensorflow1) C:\tensorflow1\models\research\object_detection>
I got this error when running train.py command. can you help?
The text was updated successfully, but these errors were encountered: