How To Install TensorFlow In Ubuntu Linux




[ad_1]

How to install Tensor Flow or TensorFlow in Ubuntu linux.

Tensor flow is an graph based computational deep learning framework which follows symbolic programming.

To Install Tensorflow :-
Open Terminal by CTRL+T

sudo apt-get update
sudo apt-get upgrade -y

Then, First Install Python3 by –
sudo apt-get install python3

Then install python3 pip by –
sudo apt-get install python3-pip

Now, Install Tensorflow by –
pip3 install tensorflow

After we have installed Tensorflow, let make a sample program using tensorflow –
first use any code-editor like emacs or gedit . In this video, I am using emacs code editor. you can use one of many code-editor as per your preferences.

Now after lets say running –
emacs test.py

Type the following python code statements –
import tensorflow as tf;

graph = tf.Graph(); #to get the default graph.
with graph.as_default() :
x = tf.constant(5, name = “x_value”);
y = tf.constant(3, name= “y_value”);
sum = tf.add(x, y, name=”added_value”);

with tf.Session() as session :
print(“Result : “, sum.eval() );

Then save it and on the terminal, run :
python3 test.py

you should be able to see the output on the terminal :
Result : 8

So, Now you have successfully installed tensorflow in ubuntu linux.

Blog: https://www.devtechsolutions.in/2019/03/how-to-install-tensorflow-in-ubuntu.html

Source


[ad_2]

Comment List

  • DevTech Solutions
    December 16, 2020

    How do I see this installation in pycharm

  • DevTech Solutions
    December 16, 2020

    it's saying no matching distribution for tenserflow

  • DevTech Solutions
    December 16, 2020

    For instruction: sudo apt-get install python3-pip
    Reading package lists…Done
    Building dependency tree
    Reading state information…Done
    E: Unable to locate package python3-pip
    Please help…

Write a comment