What is Tensorflow?
So, lets start with what is tensorflow?
Tensorflow is an open-source library with is capable of running machine learning algorithms.It was developed by google brain’s team(Second-gen, DistBelief was the 1st).
NOTE: You need to have python3.6 installed (
sudo dnf install python3)
Installation of TensorFlow CPU in Fedora
- In the 1st stage, we need to create a virtual environment(we will use
virtualenv [isolated Python environment])pip3 install virtualenv
- Now let’s create a virtual environment(virtualenv).
virtualenv --system-site-packages -p /usr/bin/python3.6 ./venv && source ./venv/bin/activate
- Now lets install tensorflow
pip install tensorflow
- Now, to move out of the virtual environment type
Now lets test our TensorFlow
- Create a file,
touch mark1.py nano mark1.py
- Then write this in the
import tensorflow as tf class SquareTest(tf.test.TestCase): def testSquare(self): with self.test_session(): x = tf.square([2, 3]) self.assertAllEqual(x.eval(), [4, 9]) if __name__ == '__main__': tf.test.main()
** If you want to learn how to install tensorflow GPU, Please read this