Evaluating in TensorFlow Object Detection API – AttributeError

Hello everyone,

I have successfully trained my model using the TensorFlow Object Detection API and wanted to evaluate it on it. I used the following site as a guide:

Link for the code “”:

After running the script “”, I received the following error message:

-> INFO:tensorflow:Waiting for new checkpoint at models/my_ssd_resnet50_v1_fpn -> I1220 17:06:56.024288 140351537808192] Waiting for new checkpoint at models/my_ssd_resnet50_v1_fpn -> INFO:tensorflow:Found new checkpoint at models/my_ssd_resnet50_v1_fpn/ckpt-2 -> I1220 17:06:56.024974 140351537808192] Found new checkpoint at models/my_ssd_resnet50_v1_fpn/ckpt-2 -> 2021-12-20 17:06:56.098253: I tensorflow/compiler/mlir/] None of the MLIR Optimization Passes are enabled (registered 2) -> /home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/keras/ UserWarning: tf.keras.backend.set_learning_phase is deprecated and will be removed after 2020-10-11. To update it, simply pass a True/False value to the `training` argument of the `call` method of your layer or model. -> warnings.warn(‘`tf.keras.backend.set_learning_phase` is deprecated and ‘ -> 2021-12-20 17:07:08.993353: I tensorflow/stream_executor/cuda/] Loaded cuDNN version 8204 -> Traceback (most recent call last): -> File “/home/ameisemuhammed/TensorFlow/workspace/training_demo/”, line 114, in <module> -> File “/home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/platform/”, line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) -> File “/home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/absl/”, line 303, in run _run_main(main, args) -> File “/home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/absl/”, line 251, in _run_main sys.exit(main(argv)) -> File “/home/ameisemuhammed/TensorFlow/workspace/training_demo/”, line 81, in main model_lib_v2.eval_continuously( -> File “/home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/object_detection/”, line 1141, in eval_continuously optimizer.shadow_copy(detection_model) -> File “/home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/keras/optimizer_v2/”, line 830, in getattribute raise e -> File “/home/ameisemuhammed/anaconda3/envs/tensorflow/lib/python3.9/site-packages/keras/optimizer_v2/”, line 820, in getattribute return super(OptimizerV2, self).getattribute(name) -> AttributeError: ‘SGD’ object has no attribute ‘shadow_copy’“

My versions:

TensorFlow = 2.6.0
TensorFlow GPU = 2.6.0
Ubuntu = 20.04
Python = 3.9.7
GPU = NVIDIA Corporation TU104 [GeForce RTX 2080]
CUDA = 11.5
cuDNN = 8.2.4

Could the problem be from the TensorFlow version or CUDA/cuDNN version?
If more information is needed, please let me know!

submitted by /u/GT_King0895
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *