Comments (7)
@levinwil the problem in my case
INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0
was due to the fact that, I have not recompiled the csv and image files using generate_tfrecord.py
to get the new .record
files after adding new images.
Just by recompiling, solved the issue.
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
In case anyone else runs into this problem and the above solution did not fix your problem, below are some other possible solutions:
Try updating tensorflow to the latest version using 'pip install --upgrade tensorflow' (or if you are using GPU, 'pip install --upgrade tensorflow-gpu')
If you need to be using your current version of tensorflow, perhaps for compatability with CUDA 8, you can change the line to the following:
"records_dataset = filename_dataset.interleave(file_read_func, cycle_length=config.num_readers, block_length=config.read_block_length)"
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
@AshleyRoth I do have the same problem. Help needed @EdjeElectronics !!
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
It looks like it may be related to using old versions of TensorFlow. If you're using TF 1.5, can you try using TF 1.8.0 instead and see if the error goes away?
tensorflow/models#3432
tensorflow/tensor2tensor#558
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
@EdjeElectronics I have upgraded to TF 1.8.0 , still it's showing the following error:
WARNING:tensorflow:From /home/shubhajit/Desktop/tensorflow1/models/research/object_detection/trainer.py:257: 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 /home/shubhajit/Desktop/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 /home/shubhajit/Desktop/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 "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 510, in _apply_op_helper
preferred_dtype=default_dtype)
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1104, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 235, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 214, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 441, 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 "/home/shubhajit/anaconda3/lib/python3.6/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 "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1104, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 235, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 214, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 441, 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 184, in <module>
tf.app.run()
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "train.py", line 180, in main
graph_hook_fn=graph_rewriter_fn)
File "/home/shubhajit/Desktop/tensorflow1/models/research/object_detection/trainer.py", line 288, in train
train_config.optimizer)
File "/home/shubhajit/Desktop/tensorflow1/models/research/object_detection/builders/optimizer_builder.py", line 50, in build
learning_rate = _create_learning_rate(config.learning_rate)
File "/home/shubhajit/Desktop/tensorflow1/models/research/object_detection/builders/optimizer_builder.py", line 109, in _create_learning_rate
learning_rate_sequence, config.warmup)
File "/home/shubhajit/Desktop/tensorflow1/models/research/object_detection/utils/learning_schedules.py", line 169, in manual_stepping
[0] * num_boundaries))
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 2681, in where
return gen_math_ops.select(condition=condition, x=x, y=y, name=name)
File "/home/shubhajit/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 6699, in select
"Select", condition=condition, t=x, e=y, name=name)
File "/home/shubhajit/anaconda3/lib/python3.6/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 [].
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
@shubhajitml unfortunately on ubuntu I could not run. after update tensorflow i have error same 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 [].
I had to switch to WINDOWS 10, but I would like all the same for ubuntu
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
@AshleyRoth switching to different os is not going to solve the issue.The TensorFlow object detection API itself was built on Linux-based os like Ubuntu, so we should try to fix this error with this native os.
Here are some solutions to try:
@EdjeElectronics I have tried the above mentioned solutions and fixed the ValueError
problem,
but my training is not initiating, though I have waited for hours:
INFO:tensorflow:Done running local_init_op. INFO:tensorflow:Done running local_init_op. INFO:tensorflow:Starting Session. INFO:tensorflow:Starting Session. INFO:tensorflow:Saving checkpoint to path training/model.ckpt INFO:tensorflow:Saving checkpoint to path training/model.ckpt INFO:tensorflow:Starting Queues. INFO:tensorflow:Starting Queues. INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:global_step/sec: 0
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.
Related Issues (20)
- module has no attribute 'return_coordinates'
- Step 5b: How to change the files, if you use the newer (TF2) ssd_mobilenet_v2_fpnlite_320x320_coco17_tpu-8
- ImportError: cannot import name 'resnet' from 'tensorflow.python.keras.applications
- TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
- No module named 'nets' HOT 1
- NotImplementedError: Cannot convert a symbolic Tensor (cond_2/strided_slice:0) to a numpy array.
- 2f the path C:\tensorflow1\models\research cannot found setup.py HOT 1
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc1 in position 97: invalid start byte
- Train using images instead of tfrecord?
- TypeError: can't pickle _thread.RLock objects
- object_detection_tutorial.ipynb HOT 2
- Part 4:python generate_tfRecord.py --csv_input=images\ train_allags.csv --image_dir=images\train --output_path=train HOT 1
- raise ValueError('You must supply the path to save to with --output_file') ValueError: You must supply the path to save to with --output_file HOT 1
- raise ValueError('You must supply the path to save to with --output_file') ValueError: You must supply the path to save to with --output_file
- Files missing HOT 2
- mAP score HOT 1
- How to convert .pb model file to .tflite to use in App Mobile (Android) HOT 1
- ModuleNotFoundError: No module named 'tensorflow.compat' HOT 1
- problem with running python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
- Does it works for intel gpu training?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.