tensorflow / models

Models and examples built with TensorFlow
Other
77.02k stars 45.78k forks source link

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

Open hzxie opened 4 years ago

hzxie commented 4 years ago

Prerequisites

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

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

hzxie commented 4 years ago

Seems related to #3661