一、课件
二、课后习题
三、答案
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
with tf.name_scope("input"):
a = tf.constant([[2, -1], [0, 3], [-5, 4]], name = "A")
b = tf.constant([[1, 0, 1, 0], [0, 1, 0, -1]], name = "B")
with tf.name_scope('OP'):
c = tf.matmul(a, b)
d = tf.transpose(b)
with tf.Session() as sess:
writer = tf.summary.FileWriter('logs/', sess.graph)
print(sess.run(c))
print(sess.run(d))
#运行代码
#控制台
tensorboard --logdir=路径
Comments | NOTHING