tensorflow / tensorflow/models

TypeError: Expected int32 passed to parameter 'n' of op 'QueueDequeueManyV2', got 1.0 of type 'float' instead.

Open
#8,878 1 comment 0 reactions 2 assignees View on GitHub

@aquariusjay is already working on this.

Since Jul 17, 2020.

models:research type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/feelvos

2. Describe the bug

I got the following error when running bash train.sh.
The README doesn't tell us which TF to use. See also #8877

Traceback (most recent call last):
  File "/mnt/lustre/xiehaozhe/Development/feelvos/train.py", line 630, in <module>
    tf.app.run()
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/platform/app.p
y", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "/mnt/lustre/xiehaozhe/Development/feelvos/train.py", line 405, in main
    three_frame_dataset)])
  File "/mnt/lustre/xiehaozhe/Development/feelvos/train.py", line 403, in <listcomp>
    three_frame_dataset_ in zip(FLAGS.dataset, FLAGS.dataset_dir,
  File "/mnt/lustre/xiehaozhe/Development/feelvos/train.py", line 622, in _get_dataset_and_samples
    add_prev_frame_label=not FLAGS.also_attend_to_previous_frame
  File "/mnt/lustre/xiehaozhe/Development/feelvos/utils/video_input_generator.py", line 537, in get
    dynamic_pad=True)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/util/deprecati
on.py", line 324, in new_func
    return func(*args, **kwargs)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/training/input
.py", line 1077, in maybe_batch
    name=name)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/training/input
.py", line 789, in _batch
    dequeued = queue.dequeue_many(batch_size, name=name)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/ops/data_flow_
ops.py", line 489, in dequeue_many
    self._queue_ref, n=n, component_types=self._dtypes, name=name)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/ops/gen_data_f
low_ops.py", line 3862, in queue_dequeue_many_v2
    timeout_ms=timeout_ms, name=name)
  File "/mnt/lustre/xiehaozhe/Applications/anaconda3/lib/python3.6/site-packages/tensorflow_core/python/framework/op_d
ef_library.py", line 537, in _apply_op_helper
    repr(values), type(values).__name__, err))
TypeError: Expected int32 passed to parameter 'n' of op 'QueueDequeueManyV2', got 1.0 of type 'float' instead. Error: 
Expected int32, got 1.0 of type 'float' instead.

3. Steps to reproduce

bash train.sh

4. Expected behavior

The program runs normally without raising TypeError: Expected int32 passed to parameter 'n' of op 'QueueDequeueManyV2', got 1.0 of type 'float' instead.'.

5. Additional context

None

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Cent OS 7.3
  • Mobile device name if the issue happens on a mobile device: N/a
  • TensorFlow installed from (source or binary): Binary
  • TensorFlow version (use command below): 1.14.0 / 1.15.3
  • Python version: 3.6.5
  • Bazel version (if compiling from source): N/a
  • GCC/Compiler version (if compiling from source): 5.4.0
  • CUDA/cuDNN version: 9.0
  • GPU model and memory: NVIDIA TITAN Xp / 12GB

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.