2

I'm using object detection raccoon by datitran(https://github.com/datitran/raccoon_dataset) to train my own dataset and met an issue.

Environment Info.:

OS:Windows 10 64bit

CUDA and CUDNN: CUDA 10/CUDNN 7.5.0

Tensorflow version:1.13.1(GPU)

Python version:3.7.0 64 bit (Anaconda, Inc. on win32)

Model:ssd_mobilenet_v1_coco

Issue:

start trainning by

python model_main.py 
--pipeline_config_path=Z:/Train/ssd_mobilenet_v1_coco_ship.config 
--model_dir=Z:/Train/train 
--alsologtostderr

and

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:Forced number of epochs for all eval validations to be 1.
WARNING:tensorflow:Expected number of evaluation epochs is 1, but instead encountered `eval_on_train_input_config.num_epochs` = 0. Overwriting `num_epochs` to 1.
WARNING:tensorflow:Estimator's model_fn (<function create_model_fn.<locals>.model_fn at 0x000001DB9EADB8C8>) includes params argument, but params are not passed to Estimator.
WARNING:tensorflow:From D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
WARNING:tensorflow:From D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\builders\dataset_builder.py:80: parallel_interleave (from tensorflow.contrib.data.python.ops.interleave_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.data.experimental.parallel_interleave(...)`.
Traceback (most recent call last):
  File "model_main.py", line 109, in <module>
    tf.app.run()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "model_main.py", line 105, in main
    tf.estimator.train_and_evaluate(estimator, train_spec, eval_specs[0])
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 471, in train_and_evaluate
    return executor.run()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 611, in run
    return self.run_local()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\training.py", line 712, in run_local
    saving_listeners=saving_listeners)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 358, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1124, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1151, in _train_model_default
    input_fn, model_fn_lib.ModeKeys.TRAIN))
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 992, in _get_features_and_labels_from_input_fn
    self._call_input_fn(input_fn, mode))
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 1079, in _call_input_fn
    return input_fn(**kwargs)
  File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\inputs.py", line 488, in _train_input_fn
    batch_size=params['batch_size'] if params else train_config.batch_size)
  File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\builders\dataset_builder.py", line 134, in build
    config.input_path[:], input_reader_config)
  File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\builders\dataset_builder.py", line 80, in read_dataset
    sloppy=config.shuffle))
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1605, in apply
    return DatasetV1Adapter(super(DatasetV1, self).apply(transformation_func))
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1127, in apply
    dataset = transformation_func(self)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\experimental\ops\interleave_ops.py", line 88, in _apply_fn
    buffer_output_elements, prefetch_input_elements)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 133, in __init__
    cycle_length, block_length)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2827, in __init__
    super(InterleaveDataset, self).__init__(input_dataset, map_func)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2798, in __init__
    map_func, self._transformation_name(), dataset=input_dataset)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2124, in __init__
    self._function.add_to_graph(ops.get_default_graph())
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 490, in add_to_graph
    self._create_definition_if_needed()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 341, in _create_definition_if_needed
    self._create_definition_if_needed_impl()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 355, in _create_definition_if_needed_impl
    whitelisted_stateful_ops=self._whitelisted_stateful_ops)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 883, in func_graph_from_py_func
    outputs = func(*func_graph.inputs)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2099, in tf_data_structured_function_wrapper
    ret = func(*nested_args)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 247, in __init__
    filenames, compression_type, buffer_size, num_parallel_reads)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 212, in __init__
    self._impl = filenames.flat_map(read_one_file)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1005, in flat_map
    return FlatMapDataset(self, map_func)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2798, in __init__
    map_func, self._transformation_name(), dataset=input_dataset)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2124, in __init__
    self._function.add_to_graph(ops.get_default_graph())
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 490, in add_to_graph
    self._create_definition_if_needed()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 341, in _create_definition_if_needed
    self._create_definition_if_needed_impl()
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 355, in _create_definition_if_needed_impl
    whitelisted_stateful_ops=self._whitelisted_stateful_ops)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 883, in func_graph_from_py_func
    outputs = func(*func_graph.inputs)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2099, in tf_data_structured_function_wrapper
    ret = func(*nested_args)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 209, in read_one_file
    return _TFRecordDataset(filename, compression_type, buffer_size)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 111, in __init__
    argument_dtype=dtypes.string)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\util\convert.py", line 35, in optional_param_to_tensor
    argument_default, dtype=argument_dtype, name=argument_name)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 245, in constant
    allow_broadcast=True)
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 283, in _constant_impl
    allow_broadcast=allow_broadcast))
  File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 501, in make_tensor_proto
    (dtype, nparray.dtype, values))
TypeError: Incompatible types: <dtype: 'string'> vs. object. Value is

how to handle with this?

EDIT:I have uninstalled the latest version TensorFlow, the previous version works well. Therefore I can not offer more error Info. @rachelim

1
  • 1
    Your error message is slightly truncated. Can you paste the full TypeError? Thanks Commented Mar 5, 2019 at 21:13

1 Answer 1

1

You can try cuda 9.0, that problem may caused by darkflow not supporting tensorflow 1.13.1.

Sign up to request clarification or add additional context in comments.

1 Comment

I have uninstalled the latest version TensorFlow, the previous version works well. Thanks for your answer!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.