The target

This article is intended to introduce the introduction of TensorFlow and practical examples. We hope that you will become familiar with the operation of TensorFlow after learning it

Simple FETCH code

Import tensorflow as TF a = tf.constant(1.0) b = tf.constant(4.0) C = tf.constant(7.0) add = tf.add(tf.add(a, b), c) mul = tf.multiply(tf.multiply(a, b), c) with tf.Session() as sess: print(sess.run(add)) print(sess.run(mul))Copy the code

The output

12.0
28.0
Copy the code

Simple feed code

import tensorflow as tf

n = tf.placeholder(tf.int8)
m = tf.placeholder(tf.int8)
r = tf.multiply(n,m)
with tf.Session() as sess:
    print(sess.run(r, feed_dict={n:3,m:4}))   
Copy the code

The output

12    
Copy the code

In this paper, the reference

Reference for this article: blog.csdn.net/qq_19672707…