TensorFlow北大公开课学习笔记-3.1张量计算图会话

前期主要把代码敲进来,方便复习

import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

import tensorflow as tf

a=tf.constant([[1.0,2.0]])
b=tf.constant([[3.0],[4.0]])

result=tf.matmul(a,b)
print(result)

with tf.Session() as sess:
     print (sess.run(result))

猜你喜欢

转载自blog.csdn.net/sxlsxl119/article/details/81430840