kerlomz / captcha_trainer

[验证码识别-训练] This project is based on CNN/ResNet/DenseNet+GRU/LSTM+CTC/CrossEntropy to realize verification code identification. This project is only for training the model.
Apache License 2.0
3k stars 818 forks source link

tf-gpu 1.10.0 报错module 'tensorflow.sparse' has no attribute 'to_dense' #12

Open Times125 opened 5 years ago

Times125 commented 5 years ago

你好,kerlomz,我使用您的代码跑的时候,framework.py中的类GraphOCR中的 self.dense_decoded = tf.sparse.to_dense(self.decoded[0], default_value=-1, name="dense_decoded")这行代码报错,AttributeError: module 'tensorflow.sparse' has no attribute 'to_dense'。请问您确定在TF_GPU 1.10.0这个版本可以运行您的程序? 谢谢~

kerlomz commented 5 years ago

1.12,最近更新的那个函数,我下午更新一个兼容方案

Times125 commented 5 years ago

嗯嗯,好的,谢谢!

------------------ 原始邮件 ------------------ 发件人: "kerlomz"notifications@github.com; 发送时间: 2019年4月15日(星期一) 中午11:51 收件人: "kerlomz/captcha_trainer"captcha_trainer@noreply.github.com; 抄送: "李春辉"1251680944@qq.com; "Author"author@noreply.github.com; 主题: Re: [kerlomz/captcha_trainer] tf-gpu 1.10.0 报错module 'tensorflow.sparse' has no attribute 'to_dense' (#12)

1.12,最近更新的那个函数,我下午更新一个兼容方案

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

kerlomz commented 5 years ago

你现在更新代码试下

Times125 commented 5 years ago

你现在更新代码试下

谢谢,已经可以运行了

Times125 commented 5 years ago

你现在更新代码试下

像这种错误,我需要改哪里啊? 2019-04-15 15:47:05.771705: W T:\src\github\tensorflow\tensorflow\core\util\ctc\ctc_loss_calculator.cc:144] No valid path found. Step: 16600 Time: 0.241, Cost = inf

kerlomz commented 5 years ago

看项目介绍哦,有讲这个问题,用Resize修改图片尺寸

Times125 commented 5 years ago

已经通过设置PreprocessCollapseRepeated:True 解决此问题。建议默认设置这个项为True

------------------ 原始邮件 ------------------ 发件人: "kerlomz"notifications@github.com; 发送时间: 2019年4月15日(星期一) 下午4:09 收件人: "kerlomz/captcha_trainer"captcha_trainer@noreply.github.com; 抄送: "李春辉"1251680944@qq.com; "Author"author@noreply.github.com; 主题: Re: [kerlomz/captcha_trainer] tf-gpu 1.10.0 报错module 'tensorflow.sparse' has no attribute 'to_dense' (#12)

看项目介绍哦,有讲这个问题,用Resize修改图片尺寸

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.