Issue
I managed to successfully install Tensorflow 2 on windows with object detection. After running the command:
python model_main_tf2.py --pipeline_config_path=ssd_efficientdet_d0_512x512_coco17_tpu-8.config --model.dir=training --alsologtostderr
I get this Traceback:
W0724 22:39:24.257511 12060 deprecation.py:350] From C:\Users\malde\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\util\dispatch.py:1176: 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 "C:\Users\malde\Documents\TF2\models\research\object_detection\model_main_tf2.py", line 114, in <module>
tf.compat.v1.app.run()
File "C:\Users\malde\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\platform\app.py", line 36, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\malde\anaconda3\envs\tf2\lib\site-packages\absl\app.py", line 308, in run
_run_main(main, args)
File "C:\Users\malde\anaconda3\envs\tf2\lib\site-packages\absl\app.py", line 254, in _run_main
sys.exit(main(argv))
File "C:\Users\malde\Documents\TF2\models\research\object_detection\model_main_tf2.py", line 105, in main
model_lib_v2.train_loop(
File "C:\Users\malde\anaconda3\envs\tf2\lib\site-packages\object_detection\model_lib_v2.py", line 591, in train_loop
os.path.join(model_dir, 'train'))
File "C:\Users\malde\anaconda3\envs\tf2\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Has anyone else encountered this issue and has been able to resolve it?
I haven't been able to find much info online about this error. Looks like someone has been able to fix it by recreating csv files, but it did not help me.
Solution
Sounds like model_dir
is None. I guess the argument in your command should be --model_dir=training
.
Answered By - Martin Benes
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.