- TensorFlow 2.0 Quick Start Guide
- Tony Holdroyd
- 233字
- 2021-06-24 16:02:02
Installing TensorFlow
The best programming support for TensorFlow is provided for Python (although libraries do exist for Java, C, and Go, while those for other languages are under active development).
There is a wealth of information on the web for installing TensorFlow for Python.
It is standard practice, also recommended by Google, to install TensorFlow in a virtual environment, that is, an environment that isolates a set of APIs and code from other APIs and code and from the system-wide environment.
There are two distinct versions of TensorFlow—one for execution on a CPU and another for execution on a GPU. This last requires that the numerical libraries CUDA and CuDNN are installed. Tensorflow will default to GPU execution where possible. See https://www.tensorflow.org/alpha/guide/using_gpu.
Rather than attempt to reinvent the wheel here, there follow resources for creating virtual environments and installing TensorFlow.
In summary, TensorFlow may be installed for Windows 7 or later, Ubuntu Linux 16.04 or later, and macOS 10.12.6 or later.
There is a thorough introduction to virtual environments at http://docs.python-guide.org/.
There is a very detailed set of information on all aspects of what is required to install TensorFlow in the official Google documentation at https://www.tensorflow.org/install/.
Once installed, you can check your TensorFlow installation from a command terminal. There are instructions for doing this at http://www.laurencemoroney.com/tensorflow-to-gpu-or-not-to-gpu/ and for installing the nightly build of TensorFlow, which contains all of the latest updates.