[Tensorflow] Activating Tensorflow

Activating Tensorflow for the first time

Taken from a ticket/thread from mid 2017. More documentation about Tensorflow can be found with this link:

That webpage contains 'common installation problem' list and updated package links.

Step-by-step guide

You may just have a path issue with access it. Tensorflow is installed in a virtual environment so you have to source that environment before you can use it.

## E.g. source /usr/local/tensorflow-env/bin/activate

TEST Tensor Flow
python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
a = tf.constant(10)
b = tf.constant(32)
print(sess.run(a + b))
END TEST Tensor Flow
CTRL-D
deactivate

If you would like to update tensorflow it you can try the following:

sudo bash
cd /usr/local
mkdir tensorflow.old
mv tensorflow ./tensorflow.old
mv tensorflow-env ./tensorflow.old
virtualenv --system-site-packages /usr/local/tensorflow
source /usr/local/tensorflow/bin/activate
pip install --upgrade pyparsing
pip install pbr funcsigs

pip install --upgrade protobuf
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl
exit

You would then use this with:

#Activate Tensor Flow
source /usr/local/tensorflow/bin/activate

TEST Tensor Flow
python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
a = tf.constant(10)
b = tf.constant(32)
print(sess.run(a + b))
END TEST Tensor Flow
CTRL-D
deactivate

Torch should already be installed, in the system path as part of the NVIDIA apt-get provided Digits.

E.g.

exx@U00887:~$ th

______ __ | Torch7 
/_ _/_ ________/ / | Scientific computing for Lua. 
/ / / _ \/ __/ __/ _ \ | Type ? for help 
// _// _///_/ | https://github.com/torch

http://torch.ch
th>

BIDMach is installed in /usr/local/BIDMach_1.0.3-linux-x86_64 and should be accessible from there.