ilovin / lstm_ctc_ocr

Use CTC + tensorflow to OCR
https://ilovin.github.io/2017-04-06/tensorflow-lstm-ctc-ocr/
354 stars 140 forks source link

warpCTC: when I run python lstm_ocr.py to training it just use CPU not use GPU #18

Closed gnnbest closed 6 years ago

gnnbest commented 7 years ago

In the master branch when I use warpCTC it just use CPU not use GPU? The training runs very slowly. Do I need to change the code somewhere to use GPU?

ilovin commented 7 years ago

warpCTC shall be python lstm_warpCTC.py

gnnbest commented 7 years ago

奥奥,不好意思,是我写错了,我实际运行的就是python lstm_warpCTC.py 然后我修改了 lstm_warpCTC.py代码 把log_device_placement设为True让它打印设备信息,打印结果显示程序只用了CPU好像没有用到GPU,我用的是GPU版本的tensorflow, 用自己写的测试程序测试是可以启用GPU的,但是咱的项目好像没启用,不知道是哪里的问题,是还需要修改某个地方的代码吗?现在用CPU运行的比较慢但是准确率是一直再提升的,我就想试试启用GPU看能不能提高速度,但是现在就是不知道怎么启用GPU了?