-
Notifications
You must be signed in to change notification settings - Fork 45.8k
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 []. #3752
Comments
I got the same issue |
I hit this too while training faster_rcnn_resnet101_coco_2017_11_08 with TF 1.6. Also tried 1.5.1, throws the same error. I am on Ubuntu 16.04. Edit: I have previously been using TF 1.4.1 with some older revision of tf-models without any problem, now I wanted to use newer TF so I upgraded to TF 1.6 and grabbed the latest tf-models master (08af777). Edit 2: the error occurs also when attempting to fine tune the latest relase faster_rcnn_resnet101_coco_2018_01_28. |
Seems to be Python 3 compatibility issue, found solution here: #3705 (comment) |
@lcerman, I made the change as you suggested and it worked. Thanks. |
@ashiqgiga Hi can you please tell me which solution you followed? |
i have the same error, and change both files learning_schedules like the solution #3705 (comment) but keep error: INFO:tensorflow:Scale of 0 disables regularizer. 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 modified the file learning_schedules.py in path the anaconda. works for me |
@Ron-Junior |
If you change the file learning_schedules like the solution #3705 still got the same error. \models\research> python setup.py build It works for me. |
In my case, the following edits solves my error. Here, 'net_out', itself, is not a output result of the network. The following tutorials for tensorlayer helped to solve this issue in my case. |
Followed #3705 was able to train using CPU, but tensorflow gpu throwed lot of new errors |
Hi There, |
System information
binary
While running with the pre-trained object_detection every model with Anaconda python 3.6.4 below given error is shown with the new version Tensorflow 1.6.0
Traceback (most recent call last): File "train.py", line 167, in <module> tf.app.run() File "C:\Users\MAT\Anaconda3\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:\Users\MAT\models-master\research\object_detection\trainer.py", line 2 55, in train train_config.optimizer) File "C:\Users\MAT\models-master\research\object_detection\builders\optimizer_ builder.py", line 50, in build learning_rate = _create_learning_rate(config.learning_rate) File "C:\Users\MAT\models-master\research\object_detection\builders\optimizer_ builder.py", line 109, in _create_learning_rate learning_rate_sequence, config.warmup) File "C:\Users\MAT\models-master\research\object_detection\utils\learning_sche dules.py", line 169, in manual_stepping [0] * num_boundaries)) File "C:\Users\MAT\Anaconda3\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:\Users\MAT\Anaconda3\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:\Users\MAT\Anaconda3\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 [].
The text was updated successfully, but these errors were encountered: