IrisRainbowNeko / genshin_auto_fish

基于深度强化学习的原神自动钓鱼AI
4.78k stars 717 forks source link

ImportError: yolox/exp/yolox_tiny_fish.py doesn't contains class named 'Exp' #70

Closed windskyxb closed 3 years ago

windskyxb commented 3 years ago

(ysfish) C:\Users\winds\Downloads\genshin_auto_fish>python yolox_tools/train.py -f yolox/exp/yolox_tiny_fish.py -d 1 -b 8 --fp16 -o -c weights/yolox_tiny.pth Traceback (most recent call last): File "c:\users\winds\downloads\genshin_auto_fish\yolox\exp\build.py", line 13, in get_exp_by_file current_exp = importlib.import_module(os.path.basename(exp_file).split(".")[0]) File "C:\ProgramData\Anaconda3\envs\ysfish\lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 674, in exec_module File "", line 781, in get_code File "", line 741, in source_to_code File "", line 219, in _call_with_frames_removed File "yolox/exp\yolox_tiny_fish.py", line 22 self.data_dir = "C:\Users\winds\Downloads\genshin_auto_fish\yolox\datas\fish_dataset" ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape During handling of the above exception, another exception occurred: Traceback (most recent call last): File "yolox_tools/train.py", line 115, in exp = get_exp(args.exp_file, args.name) File "c:\users\winds\downloads\genshin_auto_fish\yolox\exp\build.py", line 51, in get_exp return get_exp_by_file(exp_file) File "c:\users\winds\downloads\genshin_auto_fish\yolox\exp\build.py", line 16, in get_exp_by_file raise ImportError("{} doesn't contains class named 'Exp'".format(exp_file)) ImportError: yolox/exp/yolox_tiny_fish.py doesn't contains class named 'Exp'

屏幕截图(22).png 屏幕截图(21).png

CenJieTeng commented 3 years ago

用相对路径试试

windskyxb commented 3 years ago

用相对路径试试

请问相对路径要怎么写?初学者不太懂