models icon indicating copy to clipboard operation
models copied to clipboard

Perspective Transformer Nets shapenet_all training error

Open Bedrettin-Cetinkaya opened this issue 8 years ago • 6 comments

System information

  • What is the top-level directory of the model you are using: ptn_directory
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): empty init.py file added under ptn_directory and nets directory.
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):Linux Ubuntu 16.04
  • TensorFlow installed from (source or binary): via pip install
  • TensorFlow version (use command below):1.4.1
  • Bazel version (if compiling from source): Not installed
  • CUDA/cuDNN version: 9.0.176
  • GPU model and memory: Tesla k80, 16 GB
  • Exact command to reproduce:python train_ptn.py

Describe the problem

When i changed dataset from shapenet_chair to shapenet_all ( shapenet_chair runs without any error),it gives following error after creating 0.jpg:

Source code / logs

2018-09-19 17:00:53.382598: W tensorflow/core/framework/op_kernel.cc:1198] Unknown: exceptions.IndexError: arrays used as indices must be of integer (or boolean) type Traceback (most recent call last): File "/truba/home/bcetinkaya/ptn/ptn_orig/train_ptn.py", line 231, in app.run() File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 124, in run _sys.exit(main(argv)) File "/truba/home/bcetinkaya/ptn/ptn_orig/train_ptn.py", line 227, in main save_interval_secs=FLAGS.save_interval_secs) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/contrib/slim/python/slim/learning.py", line 782, in train ignore_live_threads=ignore_live_threads) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/training/supervisor.py", line 826, in stop ignore_live_threads=ignore_live_threads) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 387, in join six.reraise(*self._exc_info_to_raise) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 295, in stop_on_exception yield File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/training/coordinator.py", line 492, in run self.run_loop() File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/training/supervisor.py", line 1028, in run_loop self._sv.global_step]) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 895, in run run_metadata_ptr) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1128, in _run feed_dict_tensor, options, run_metadata) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1344, in _do_run options, run_metadata) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1363, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.UnknownError: exceptions.IndexError: arrays used as indices must be of integer (or boolean) type [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64, DT_FLOAT, DT_FLOAT], Tout=[DT_UINT8], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/device:CPU:0"](mul_3, ResizeNearestNeighbor, ResizeNearestNeighbor_1, global_step/read, data_loading_shapenet_all/val/batching_queues/shapenet_all/val:1, decoder_1/Conv3d_transpose_2/Sigmoid/_523)]]

Caused by op u'PyFunc', defined at: File "/truba/home/bcetinkaya/ptn/ptn_orig/train_ptn.py", line 231, in app.run() File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 124, in run _sys.exit(main(argv)) File "/truba/home/bcetinkaya/ptn/ptn_orig/train_ptn.py", line 202, in main output_voxels=val_outputs['voxels_1']) File "/truba/home/bcetinkaya/ptn/ptn_orig/model_ptn.py", line 147, in write_disk_grid ], [tf.uint8], 'write_grid')[0] File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 300, in py_func func=func, inp=inp, Tout=Tout, stateful=stateful, eager=False, name=name) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 209, in _internal_py_func input=inp, token=token, Tout=Tout, name=name) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/ops/gen_script_ops.py", line 93, in _py_func "PyFunc", input=input, token=token, Tout=Tout, name=name) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3160, in create_op op_def=op_def) File "/truba/home/bcetinkaya/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1625, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

UnknownError (see above for traceback): exceptions.IndexError: arrays used as indices must be of integer (or boolean) type [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT64, DT_FLOAT, DT_FLOAT], Tout=[DT_UINT8], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/device:CPU:0"](mul_3, ResizeNearestNeighbor, ResizeNearestNeighbor_1, global_step/read, data_loading_shapenet_all/val/batching_queues/shapenet_all/val:1, decoder_1/Conv3d_transpose_2/Sigmoid/_523)]]

Bedrettin-Cetinkaya avatar Sep 19 '18 16:09 Bedrettin-Cetinkaya

@Bedrettin-Cetinkaya Hi, could you please share a code snippet to reproduce this issue.

Harshini-Gadige avatar Sep 25 '18 20:09 Harshini-Gadige

@harshini-gadige, you can download all project codes here. I didn't change any line project codes, just i added init.py files and switched dataset from shapenet_chair to shapenet_all. Rest of all codes are the same as the tensorflow research model implementation.

Bedrettin-Cetinkaya avatar Sep 25 '18 21:09 Bedrettin-Cetinkaya

@Bedrettin-Cetinkaya Hello! Have you solved this problem? thank you very much!

ZYCZH avatar Jan 04 '19 09:01 ZYCZH

@ZYCZH , No,the bug still exists.

Bedrettin-Cetinkaya avatar Jan 04 '19 14:01 Bedrettin-Cetinkaya

@Bedrettin-Cetinkaya @ZYCZH Can you double check if the data path is set correctly?

https://github.com/tensorflow/models/blob/master/research/ptn/input_generator.py#L89

xcyan avatar Jan 06 '19 22:01 xcyan

Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Jan 29 '20 23:01 tensorflowbutler