emedvedev / attention-ocr

A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
MIT License
1.08k stars 256 forks source link

InvalidArgumentError (see above for traceback): Cannot assign a device for operation prefix/Rank: Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available. #146

Closed AhmadShaik closed 4 years ago

AhmadShaik commented 5 years ago

When I tried to perform prediction on a single image, I am getting an error at Node prefix/Rank: saying could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available. I am trying to solve this problem from quite a long time. Any help or suggestions are appreciated.

chhatrachhorm commented 5 years ago

I believe you can fix this by passing the argument --gpu-id -1. e.g. aocr train ./datasets/training.tfrecords --gpu-id -1 this will let the code to use cpu:0 instead. see this model.py#L60 and this __main__.py#L88

Ryansanity commented 4 years ago

I believe you can fix this by passing the argument --gpu-id -1. e.g. aocr train ./datasets/training.tfrecords --gpu-id -1 this will let the code to use cpu:0 instead. see this model.py#L60 and this main.py#L88

i got the same question,need help~.~