Tensorflow Session

import tensorflow as tf

matrix1 = tf.constant([[3, 3]])
matrix2 = tf.constant([[2],
                       [2]])

product = tf.matmul(matrix1, matrix2)

with tf.Session() as sess:
    result2 = sess.run(product)
    print(result2)

运行 session.run() 可以获得你要得知的运算结果, 或者是你所要运算的部分.
https://morvanzhou.github.io/tutorials/machine-learning/tensorflow/2-3-session/
http://www.waitingfy.com/archives/4896

4896

Leave a Reply

Name and Email Address are required fields.
Your email will not be published or shared with third parties.