简体   繁体   中英

Remove all traces of tensorflow-gpu installation on Win10

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM