ypwhs / captcha_break

验证码识别
MIT License
2.73k stars 684 forks source link

训练报错 #26

Closed songhuaiyu closed 5 years ago

songhuaiyu commented 5 years ago

我的环境如下: win10 Anaconda3 python3.6 tensorflow1.13.1-gpu cudn10.0

tensorflow已经安装好,并且使用import tensorflow as tf测试安装没有问题

运行ctc_2019.ipynb时,前面都通过,运行到训练脚本部分,后台一直报错如下: Traceback (most recent call last): File "", line 1, in File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) AttributeError: Can't get attribute 'CaptchaSequence' on <module 'main' (built-in)> Traceback (most recent call last): File "", line 1, in File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) AttributeError: Can't get attribute 'CaptchaSequence' on <module 'main' (built-in)> Traceback (most recent call last): File "", line 1, in File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) AttributeError: Can't get attribute 'CaptchaSequence' on <module 'main' (built-in)> Traceback (most recent call last): File "", line 1, in File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "d:\softwares\anaconda3-64\envs\shy\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) AttributeError: Can't get attribute 'CaptchaSequence' on <module 'main' (built-in)> [I 10:42:01.964 NotebookApp] Saving file at /ctc_2019.ipynb

songhuaiyu commented 5 years ago

已解决 我直接改写成python脚本,并将CaptchaSequence放入另一个.py文件,然后通过import引入就不报错了,应该是python多进程程序的原因

951722070 commented 5 years ago

非常感谢你的回答, 我也遇到了同样的问题 可以给说下具体的步骤吗