tensorflow / models

Models and examples built with TensorFlow
Other
77.04k stars 45.77k forks source link

TypeError: __init__(): incompatible constructor arguments #10191

Open MojtabaSr opened 3 years ago

MojtabaSr commented 3 years ago

Hi. Im getting the following error trying to start an object detection model in an enviroment. Im using windows 10

The code that i run: python object_detection/model_main_tf2.py --pipeline_config_path "D:\data\Experiment_1\faster_rcnn_resnet50_v1_640x640_coco17_tpu-8.config" --model_dir "D:\data\Experiment_1\training_process" --alsologtostderr

The error it throws:

WARNING:tensorflow:Collective ops is not configured at program startup. Some performance features may not be enabled. W0806 19:13:45.728498 5860 mirrored_strategy.py:379] Collective ops is not configured at program startup. Some performance features may not be enabled. INFO:tensorflow:Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:GPU:0',) I0806 19:13:45.884679 5860 mirrored_strategy.py:369] Using MirroredStrategy with devices ('/job:localhost/replica:0/task:0/device:GPU:0',) Traceback (most recent call last): File "object_detection/model_main_tf2.py", line 115, in tf.compat.v1.app.run() File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\absl\app.py", line 303, in run _run_main(main, args) File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\absl\app.py", line 251, in _run_main sys.exit(main(argv)) File "object_detection/model_main_tf2.py", line 106, in main model_lib_v2.train_loop( File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\object_detection\model_lib_v2.py", line 498, in train_loop configs = get_configs_from_pipeline_file( File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\object_detection\utils\config_util.py", line 138, in get_configs_from_pipeline_file proto_str = f.read() File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 117, in read self._preread_check() File "C:\Users\Mojtaba Sr\anaconda3\envs\tf2_gpu\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 79, in _preread_check self._read_buf = _pywrap_file_io.BufferedInputStream( TypeError: init(): incompatible constructor arguments. The following argument types are supported:

  1. tensorflow.python.lib.io._pywrap_file_io.BufferedInputStream(filename: str, buffer_size: int, token: tensorflow.python.lib.io._pywrap_file_io.TransactionToken = None)

Invoked with: None, 524288

rossGardiner commented 2 years ago

I am also having this problem!

Training SSD_mobilenet_v2_fpnlite_320x320_coco17_tpu-8

TF==2.7.0

KaustubhK94 commented 2 years ago

any solution?