title: Train my model in tensorflow 2 checkpoint is expected to be an object-based checkpoint
body: <p>I'm creating a new model following this tutorial <a href="https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html" rel="nofollow noreferrer">https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html</a> but when i try to training the model, i execute the following sentence:</p>
  <pre><code>python model_main_tf2.py --model_dir=models/my_ssd_resnet50_v1_fpn --pipeline_config_path=models/my_ssd_resnet50_v1_fpn/pipeline.config
  </code></pre>
  <p>And this is the output:</p>
  <pre><code>    2020-10-21 14:01:05.982155: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
  To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
  2020-10-21 14:01:06.000363: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fbb44f076b0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
  2020-10-21 14:01:06.000386: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
  WARNING:tensorflow:There are non-GPU devices in `tf.distribute.Strategy`, not using nccl allreduce.
  W1021 14:01:06.001132 4568120768 cross_device_ops.py:1202] There are non-GPU devices in `tf.distribute.Strategy`, not using nccl allreduce.
  INFO:tensorflow:Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:CPU:0',)
  I1021 14:01:06.001378 4568120768 mirrored_strategy.py:341] Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:CPU:0',)
  INFO:tensorflow:Maybe overwriting train_steps: 10000
  I1021 14:01:06.005095 4568120768 config_util.py:552] Maybe overwriting train_steps: 10000
  INFO:tensorflow:Maybe overwriting use_bfloat16: False
  I1021 14:01:06.005259 4568120768 config_util.py:552] Maybe overwriting use_bfloat16: False
  INFO:tensorflow:Reading unweighted datasets: ['/Users/jose/Desktop/Tensorflow/workspace/training_demo/annotations/train.record']
  I1021 14:01:06.044616 4568120768 dataset_builder.py:148] Reading unweighted datasets: ['/Users/jose/Desktop/Tensorflow/workspace/training_demo/annotations/train.record']
  INFO:tensorflow:Reading record datasets for input file: ['/Users/jose/Desktop/Tensorflow/workspace/training_demo/annotations/train.record']
  I1021 14:01:06.045146 4568120768 dataset_builder.py:77] Reading record datasets for input file: ['/Users/jose/Desktop/Tensorflow/workspace/training_demo/annotations/train.record']
  INFO:tensorflow:Number of filenames to read: 1
  I1021 14:01:06.045268 4568120768 dataset_builder.py:78] Number of filenames to read: 1
  WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
  W1021 14:01:06.045435 4568120768 dataset_builder.py:85] num_readers has been reduced to 1 to match input file shards.
  WARNING:tensorflow:From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/builders/dataset_builder.py:99: parallel_interleave (from tensorflow.python.data.experimental.ops.interleave_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Use `tf.data.Dataset.interleave(map_func, cycle_length, block_length, num_parallel_calls=tf.data.experimental.AUTOTUNE)` instead. If sloppy execution is desired, use `tf.data.Options.experimental_deterministic`.
  W1021 14:01:06.047674 4568120768 deprecation.py:317] From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/builders/dataset_builder.py:99: parallel_interleave (from tensorflow.python.data.experimental.ops.interleave_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Use `tf.data.Dataset.interleave(map_func, cycle_length, block_length, num_parallel_calls=tf.data.experimental.AUTOTUNE)` instead. If sloppy execution is desired, use `tf.data.Options.experimental_deterministic`.
  WARNING:tensorflow:From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/builders/dataset_builder.py:221: DatasetV1.map_with_legacy_function (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Use `tf.data.Dataset.map()
  W1021 14:01:06.087840 4568120768 deprecation.py:317] From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/builders/dataset_builder.py:221: DatasetV1.map_with_legacy_function (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Use `tf.data.Dataset.map()
  WARNING:tensorflow:From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py:201: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Create a `tf.sparse.SparseTensor` and use `tf.sparse.to_dense` instead.
  W1021 14:01:12.571774 4568120768 deprecation.py:317] From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py:201: sparse_to_dense (from tensorflow.python.ops.sparse_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Create a `tf.sparse.SparseTensor` and use `tf.sparse.to_dense` instead.
  WARNING:tensorflow:From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/inputs.py:262: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Use `tf.cast` instead.
  W1021 14:01:15.363219 4568120768 deprecation.py:317] From /opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/inputs.py:262: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
  Instructions for updating:
  Use `tf.cast` instead.
  Traceback (most recent call last):
    File &quot;model_main_tf2.py&quot;, line 113, in &lt;module&gt;
      tf.compat.v1.app.run()
    File &quot;/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/tensorflow/python/platform/app.py&quot;, line 40, in run
      _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
    File &quot;/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/absl/app.py&quot;, line 300, in run
      _run_main(main, args)
    File &quot;/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/absl/app.py&quot;, line 251, in _run_main
      sys.exit(main(argv))
    File &quot;model_main_tf2.py&quot;, line 104, in main
      model_lib_v2.train_loop(
    File &quot;/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/model_lib_v2.py&quot;, line 564, in train_loop
      load_fine_tune_checkpoint(detection_model,
    File &quot;/opt/anaconda3/envs/ComputerVision/lib/python3.8/site-packages/object_detection/model_lib_v2.py&quot;, line 346, in load_fine_tune_checkpoint
      raise IOError('Checkpoint is expected to be an object-based checkpoint.')
  OSError: Checkpoint is expected to be an object-based checkpoint.
  </code></pre>
  <p>I dont know why raise the following error Checkpoint is expected to be an object-based checkpoint. if i have followed the tutorial step by step. Anyone can help me?</p>