我正在尝试在Google Colab上使用Tensorflow对象检测API。运行model_main.py时,出现此错误。
/content/gdrive/My Drive/Colab Notebooks/models/models/research/object_detection/builders/dataset_builder.py:135 process_fn * processed_tensors = decoder.decode(value) /content/gdrive/My Drive/Colab Notebooks/models/models/research/object_detection/data_decoders/tf_example_decoder.py:388 decode * tensors = decoder.decode(serialized_example, items=keys) /usr/local/lib/python3.6/dist-packages/tensorflow_core/contrib/slim/python/slim/data/tfexample_decoder.py:524 decode outputs.append(handler.tensors_to_item(keys_to_tensors)) /content/gdrive/My Drive/Colab Notebooks/models/models/research/object_detection/data_decoders/tf_example_decoder.py:129 tensors_to_item item = self._handler.tensors_to_item(keys_to_tensors) /content/gdrive/My Drive/Colab Notebooks/models/models/research/object_detection/data_decoders/tf_example_decoder.py:98 tensors_to_item return tf.maximum(self._name_to_id_table.lookup(unmapped_tensor), /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/lookup_ops.py:223 lookup (self._key_dtype, keys.dtype)) TypeError: Signature mismatch. Keys must be dtype dtype: 'float32', got dtype: 'string'.
我已遵循此blog中给出的确切过程。以下代码会产生此错误。
!python object_detection/model_main.py \
--pipeline_config_path=object_detection/models/model/faster_rcnn_inception_v2_pets.config \
--model_dir=object_detection/models/model \
--num_train_steps=50000 \
--sample_1_of_n_eval_examples=1 \
--alsologtostderr
以前有没有人遇到过这个问题?