0 votes
1 view
in Machine Learning by (14.7k points)

I am starting to work with TensorFlow library for deep learning, https://www.tensorflow.org/.

I found an explicit guide to work on it on Linux and Mac but I did not find how to work with it under Windows. I try over the net, but the information is lacking.

I use Visual Studio 2015 for my projects, and I am trying to compile the library with Visual studio Compiler VC14.

How to install it and to use it under Windows?

Can I use Bazel for Windows for production use?

1 Answer

0 votes
by (33.2k points)

If you are installing TensorFlow on windows. First thing you should check that whether GPU is required on this installation or not. A recent update of Windows 10 has a Ubuntu Bash environment, AKA Bash on Ubuntu on Windows, available as a standard option. This option came with the Windows 10 anniversary update (Version 1607) released on 8/2/2016. This allows the use of apt-get to install software packages such as Python and TensorFlow.

Please Note: This new feature Bash on Ubuntu on Windows does not have access to the GPU, so all of the GPU options for installing TensorFlow will not work.

Prerequisites for installing TensorFlow.

  • Enable the Windows Subsystem for Linux feature (GUI)

  • Reboot when prompted

  • Run Bash on Windows

Steps no longer needed:

  • Turn on Developer Mode

  • Enable the Windows Subsystem for Linux feature (command-line)

Then install TensorFlow using apt-get

sudo apt-get install python3-pip python3-dev

sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl

and now test TensorFlow

$ python3

...

>>> import tensorflow as tf

>>> hello = tf.constant('Hello, TensorFlow!')

>>> sess = tf.Session()

>>> print(sess.run(hello))

Hello, TensorFlow!

>>> a = tf.constant(10)

>>> b = tf.constant(32)

>>> print(sess.run(a + b))

42

>>> exit()

This code will run an actual neural network

Another way to install TensorFlow is by installing Anaconda in your system. It includes pre-installed Jupyter notebooks. Then you can install TensorFlow in Jupyter notebook.

To install current latest version please run following command:

pip install tensorflow #CPU only

pip install tensorflow-gpu #For GPU support

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...