1

I'm having an issue reverting to tensorflow-cpu from gpu on Windows 10 64 bit, Python 3.5.3.

I'm using riga/tfdeploy to distribute trained models, which is not compatible with tf-gpu. I installed tf-gpu for an experiment, then reverted to cpu, all using pip install/uninstall. Now I'm getting error messages about unknown ops like RealDiv and VariableV2. When starting a tensorflow session I now get a bunch of messages that did not appear before installing and uninstalling the GPU version, like:

OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits

My question is: How can I remove any trace of tf-gpu from my system and get back to tf-cpu? I'm using tensorflow-1.0.0-cp35-cp35m-win_amd64.whl (V1.0.0)

I read this:

How to uninstall TensorFlow completely?

And several related issues on GitHub, but haven't been able to go back to tf-cpu.

Steps to reproduce:

  1. On Win 10 64 bit, Python 3.5.3, pip install tensorflow
  2. run a tf.Session() - no messages about ops like BestSplits, RealDiv etc., tfdeploy runs fine.
  3. pip install tensorflow-gpu
  4. pip uninstall tensorflow-gpu
  5. Some trace of these ops remains registered, causing warnings like OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits while runninng tf, and also causing frameworks like tfdeploy to crash

I have tried completely reinstalling Python 3, deleting all site-packages etc. I've installed and uninstalled CUDA. The ops seem to be registered somewhere, leading to different behavior of tf-cpu after installing and uninstalling tf-gpu.

Any pointers on getting rid of/unregistering these ops is appreciated!

Community
  • 1
  • 1
azeldes
  • 183
  • 1
  • 7

1 Answers1

0

There was a bug on the PYPI packages generating OpKernel errors. The fix for that as of now is to uninstall TensorFlow, download a nightly build and install it, while the PYPI packages are not replaced.

Please see this issue on Github for more details.

Adriano
  • 750
  • 5
  • 9
  • OK, thanks, this is helpful! I installed the CPU version under the nightly build link (Feb 27), and now the OpKernel issue is solved (except for a warning about SSE instructions, which I assume wants me to build from source). The other problem still remains: tfdeploy fails on an unknown op RealDiv. Do I need an older version of tensorflow? The latest release of https://github.com/riga/tfdeploy is Dec 23. Thanks for your help! – azeldes Feb 27 '17 at 21:26
  • OK, I was able to revert to tf 0.12.0 and everything works, it seems tfdeploy is not up to date. Thanks! – azeldes Feb 27 '17 at 22:31