I have followed the procedure you gave and I successfully convert my ten channel images to tfrecored file. But I faced the following problem while I am trying to train it. FYI, I am using SSD_inception_V2., CUDA 8,tensorflow-gpu 1.3.0.
I tensorflow/core/common_runtime/simple_placer.cc:669] Ignoring device specification /GPU:0 for node 'prefetch_queue_Dequeue' because the input edge from 'prefetch_queue' is a reference connection and already has a device field set to /CPU:0
INFO:tensorflow:Starting Session.
INFO:tensorflow:Starting Queues.
INFO:tensorflow:global_step/sec: 0
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Input to reshape is a tensor with 24576000 values, but the requested shape has 3072000
[[Node: Reshape_9 = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](DecodeRaw, Cast)]]
Caused by op u'Reshape_9', defined at:
File "object_detection/train.py", line 201, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 195, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/mnt/disk1/fish/phase2/models/object_detection/trainer.py", line 185, in train
data_augmentation_options)
File "/mnt/disk1/fish/phase2/models/object_detection/trainer.py", line 59, in _create_input_queue
tensor_dict = create_tensor_dict_fn()
File "/mnt/disk1/fish/phase2/models/object_detection/builders/input_reader_builder.py", line 63, in build
return tf_example_decoder.TfExampleDecoder().decode(string_tensor)
File "/mnt/disk1/fish/phase2/models/object_detection/data_decoders/tf_example_decoder.py", line 139, in decode
tensors = decoder.decode(serialized_example, items=keys)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py", line 418, in decode
outputs.append(handler.tensors_to_item(keys_to_tensors))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py", line 97, in tensors_to_item
return self._func(keys_to_tensors)
File "/mnt/disk1/fish/phase2/models/object_detection/data_decoders/tf_example_decoder.py", line 99, in _read_image
image = tf.reshape(tf.decode_raw(image_encoded, tf.uint8), to_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 2630, in reshape
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1264, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 24576000 values, but the requested shape has 3072000
[[Node: Reshape_9 = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](DecodeRaw, Cast)]]
I have followed the procedure you gave and I successfully convert my ten channel images to tfrecored file. But I faced the following problem while I am trying to train it. FYI, I am using SSD_inception_V2., CUDA 8,tensorflow-gpu 1.3.0.
I tensorflow/core/common_runtime/simple_placer.cc:669] Ignoring device specification /GPU:0 for node 'prefetch_queue_Dequeue' because the input edge from 'prefetch_queue' is a reference connection and already has a device field set to /CPU:0 INFO:tensorflow:Starting Session. INFO:tensorflow:Starting Queues. INFO:tensorflow:global_step/sec: 0 INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, Input to reshape is a tensor with 24576000 values, but the requested shape has 3072000 [[Node: Reshape_9 = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](DecodeRaw, Cast)]]
Caused by op u'Reshape_9', defined at: File "object_detection/train.py", line 201, in
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 195, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/mnt/disk1/fish/phase2/models/object_detection/trainer.py", line 185, in train
data_augmentation_options)
File "/mnt/disk1/fish/phase2/models/object_detection/trainer.py", line 59, in _create_input_queue
tensor_dict = create_tensor_dict_fn()
File "/mnt/disk1/fish/phase2/models/object_detection/builders/input_reader_builder.py", line 63, in build
return tf_example_decoder.TfExampleDecoder().decode(string_tensor)
File "/mnt/disk1/fish/phase2/models/object_detection/data_decoders/tf_example_decoder.py", line 139, in decode
tensors = decoder.decode(serialized_example, items=keys)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py", line 418, in decode
outputs.append(handler.tensors_to_item(keys_to_tensors))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/slim/python/slim/data/tfexample_decoder.py", line 97, in tensors_to_item
return self._func(keys_to_tensors)
File "/mnt/disk1/fish/phase2/models/object_detection/data_decoders/tf_example_decoder.py", line 99, in _read_image
image = tf.reshape(tf.decode_raw(image_encoded, tf.uint8), to_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 2630, in reshape
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1264, in init
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Input to reshape is a tensor with 24576000 values, but the requested shape has 3072000 [[Node: Reshape_9 = Reshape[T=DT_UINT8, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/cpu:0"](DecodeRaw, Cast)]]