Home>
Task

This articleI want to perform transfer learning using an existing learning model like this, but when I try to prepare data and train it, an error occurs and learning is not possible, so I want to solve it.
The environment is as follows.
anaconda3
python 3.7.9
tensorflow 1.15.0rc3
windows10

error contents

Do the following as in the article

python object_detection/model_main.py --pipeline_config_path = "object_detection/ssd_mobilenet_v3_large_coco/pipeline.config" --model_dir = "./object_detection/test0001/save" --alsologtostderr


I got an error I don't understand.

Traceback (most recent call last):
  File "object_detection/model_main.py", line 108, in<module>
    tf.app.run ()
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ tensorflow_core \ python \ platform \ app.py", line 40, in run
    _run (main = main, argv = argv, flags_parser = _parse_flags_tolerate_undef)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ absl \ app.py", line 300, in run
    _run_main (main, args)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ absl \ app.py", line 251, in _run_main
    sys.exit (main (argv))
  File "object_detection/model_main.py", line 70, in main
    FLAGS.sample_1_of_n_eval_on_train_examples))
  File "C: \ Users \ USER \ Anaconda Projects \ models-master \ research \ object_detection \ model_lib.py", line 759, in create_estimator_and_inputs
    pipeline_config_path, config_override = config_override)
  File "C: \ Users \ USER \ Anaconda Projects \ models-master \ research \ object_detection \ utils \ config_util.py", line 139, in get_configs_from_pipeline_file
    text_format.Merge (proto_str, pipeline_config)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 734, in Merge
    allow_unknown_field = allow_unknown_field)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 802, in Merge Lines
    return parser.MergeLines (lines, message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 827, in Merge Lines
    self._ParseOrMerge (lines, message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 849, in _ParseOrMerge
    self._MergeField (tokenizer, message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 974, in _MergeField
    merger (tokenizer, message, field)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 1048, in _MergeMessageField
    self._MergeField (tokenizer, sub_message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 974, in _MergeField
    merger (tokenizer, message, field)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 1048, in _MergeMessageField
    self._MergeField (tokenizer, sub_message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 974, in _MergeField
    merger (tokenizer, message, field)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 1048, in _MergeMessageField
    self._MergeField (tokenizer, sub_message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 974, in _MergeField
    merger (tokenizer, message, field)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 1048, in _MergeMessageField
    self._MergeField (tokenizer, sub_message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 974, in _MergeField
    merger (tokenizer, message, field)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 1048, in _MergeMessageField
    self._MergeField (tokenizer, sub_message)
  File "C: \ anaconda3 \ envs \ aaa \ lib \ site-packages \ google \ protobuf \ text_format.py", line 941, in _MergeField
    (message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 171: 9: Message type "object_detection.protos.CosineDecayLearningRate" has no field named "fine_tune_checkpoint".
What I tried

I changed the version of Tensorflow and Python, but I got a similar error.
I also lowered batch_size and num_steps in the config file, but there was no change.

  • Answer # 1

    I commented out fine_tune_checkpoint in the configfile and it worked, but I'm not sure why.
    I'm not sure why it works.