Giter VIP home page Giter VIP logo

Comments (7)

shubhajitml avatar shubhajitml commented on August 15, 2024 1

@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.

levinwil avatar levinwil commented on August 15, 2024 1

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.

shubhajitml avatar shubhajitml commented on August 15, 2024

@AshleyRoth I do have the same problem. Help needed @EdjeElectronics !!

from tensorflow-object-detection-api-tutorial-train-multiple-objects-windows-10.

EdjeElectronics avatar EdjeElectronics commented on August 15, 2024

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.

shubhajitml avatar shubhajitml commented on August 15, 2024

@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.

AshleyRoth avatar AshleyRoth commented on August 15, 2024

@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.

shubhajitml avatar shubhajitml commented on August 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.