Error in jupyter notebook in for tensoe flow

Traceback (most recent call last):
File “C:\Users\Lenovo\ProjectCheating\Tensorflow Object Detection\TFODCourse\Tensorflow\models\research\object_detection\builders\”, line 21, in
import tensorflow.compat.v1 as tf
File “C:\Users\Lenovo\ProjectCheating\Tensorflow Object Detection\TFODCourse\tfod\Lib\site-packages\”, line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “C:\Users\Lenovo\ProjectCheating\Tensorflow Object Detection\TFODCourse\tfod\Lib\site-packages\tensorflow\”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “C:\Users\Lenovo\ProjectCheating\Tensorflow Object Detection\TFODCourse\tfod\Lib\site-packages\tensorflow\python\”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “C:\Users\Lenovo\ProjectCheating\Tensorflow Object Detection\TFODCourse\tfod\Lib\site-packages\tensorflow\python\”, line 114
def TFE_ContextOptionsSetAsync(arg1, async):
SyntaxError: invalid syntax

Hi @Taya_Jarrar
Please provide code, details on your configuration, packages and Python version. and any information that supports your question.
Thank you.

Hi @Taya_Jarrar, As per the above error there is a syntax mismatch in the code. Please make sure that your code is properly aligned. Also I can see that you are using a research model for your object detection training, those models contain some deprecated lines of code. Tensorflow does not officially support research models.

I recommend you to use the official tensorflow/models for your use case. Please refer to this tutorial for implementing object detection using official models and let us know if you faceing any errors? Thank you.

1 Like