TensorFlow dependencies needed. How to run TensorFlow on Windows

故事扮演 提交于 2019-12-22 05:54:30

问题


I am interested in getting TensorFlow to run on Windows, however at present I realize that this is not possible due to some of the dependencies not being usable with Windows, e.g. Bazel.

The need arises because as I currently understand it the only way to access the GPU from TensorFlow is via a non-virtual install of Linux. I do realize I can dual boot into a Linux install, but would prefer to avoid that route.

To resolve the problem I am in need of the entire dependency chain to build TensorFlow as was wondering if this already existed.

I also realize that I can capture the build output when building from source as a solid start, but would like to avoid that work if it is already known.

There is a beta of Bazel that runs on Windows - https://github.com/dslomov/bazel-windows

See related GitHub Issue to run TensorFlow on Windows. - https://github.com/tensorflow/tensorflow/issues/17

Another reason to run on Windows is the possibility to port to Xbox One.

I found a possible answer, still need to check it. This will generate a dependency graph as a dot file.

$ bazel query 'deps(//tensorflow/tools/pip_package:build_pip_package)' --output graph > tensorflow.dependency.dot

回答1:


There are now three main options for building and/or running TensorFlow on Windows:

  • You can install a GPU-enabled PIP package of TensorFlow 0.12rc0 from PyPI: pip install tensorflow-gpu
  • You can build the GPU-enabled PIP package yourself using the experimental CMake build. This also gives you the ability to work with TensorFlow in Visual Studio. The documentation for this build can be found here.
  • There is preliminary support for building TensorFlow using Bazel for Windows. However, we are still ironing out some bugs with this build.



回答2:


This may not be exactly what you want one way to run TensorFlow under Windows is to install a virtual machine (VMWare player v12 is free to use for non-commercial) and then install Ubuntu in that and finally TensorFlow in Ubuntu. Works well for me.




回答3:


Since the begin of 2017, Tensorflow is now officially supported on Windows and can be installed via pip:

pip install --upgrade tensorflow
pip install --upgrade tensorflow-gpu

or by fetching packages directly (pick the one that matches your needs, e.g. x64/gpu)

# x86 / CPU
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl

# x64 / CPU
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_amd64.whl
# x64 / GPU
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.0-cp35-cp35m-win_amd64.whl


来源:https://stackoverflow.com/questions/33810016/tensorflow-dependencies-needed-how-to-run-tensorflow-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!