Neural Networks and TensorFlow - Deep Learning Series [Part 7]

in #programming7 years ago

Leaving theory aside, we're finally going to start and see how TensorFlow works in practice. In this lesson, we are doing some very basic examples.

And as it happens with many programming languages, we're going to do the 'Hello World' in TensorFlow. You might say, but TensorFlow isn't a language of itself, why would you do this?

Well, it kindof gotten such a big adoption from the community that it deserve this type of treatment - in my opinion. And not only that, but the way it approaches computation calls for an exemplified implementation of the Hello World. So how do you do it?

You create two variables, say 'a' and 'b' and make of tf.constant type. Then you create another variable 'c', instantiate a session, initialize all variables, and run the session to execute 'c', which is 'a' + 'b'. So:

a = tf.constant('Hello ')
b = tf.constant('World!')
c = a + b
with tf.Session() as sess:
    sess.run(c)

Why wouldn't you just print c? Well, I explain that in the lesson, so, please watch it below if you're interested in this subject.



To stay in touch with me, follow @cristi


Cristi Vlad Self-Experimenter and Author

Sort:  

Nice and kudos, I really li

Cristi :)) la asta ma gandesc cand vad numele tau :))

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63330.55
ETH 2645.93
USDT 1.00
SBD 2.82