0
votes

I am trying to use in windows 10, tensorflow-gpu 2.4.0 to object detection. I don't know how to fix this error, could you please help me?

(tensorflow1) C:\tensorflow1\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config 2021-01-06 17:59:49.219069: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll Traceback (most recent call last): File "train.py", line 53, in from object_detection.builders import model_builder File "C:\tensorflow1\models\research\object_detection\builders\model_builder.py", line 66, in from object_detection.models import ssd_efficientnet_bifpn_feature_extractor as ssd_efficientnet_bifpn File "C:\tensorflow1\models\research\object_detection\models\ssd_efficientnet_bifpn_feature_extractor.py", line 33, in from official.vision.image_classification.efficientnet import efficientnet_model File "C:\tensorflow1\models\official\vision\image_classification\efficientnet\efficientnet_model.py", line 32, in from dataclasses import dataclass ModuleNotFoundError: No module named 'dataclasses'

Thank you in advance!

1
After many hours, I found the solution! I Use pip uninstall dataclasses and later, pip install dataclasses! - dons21

1 Answers

0
votes

Dataclasses (https://docs.python.org/3/library/dataclasses.html) were introduced in Python 3.7. Based on the error message you posted, I conclude that you are not using a version of Python 3.7 or later. The docs officially state that you need Python 3.5–3.8 (https://www.tensorflow.org/install), so don't use 3.9 which would be the latest version. But actually, the files you are using require dataclasses, and so require 3.7 or higher. I recommend upgrading to Python 3.8 to maximize your compatibility.