TensorFlow打印tensor值

在with tf.Session(config=tf.ConfigProto(log_device_placement=True)) as sess: 之后的位置

    sess.run(tf.Print(weights,[weights],summarize=100)) #显示变量的具体值


如果所输出的值太长的话,参数summarize可以控制显示的位数


参考:

https://blog.csdn.net/qq_34484472/article/details/75049179?locationNum=5&fps=1

猜你喜欢

转载自blog.csdn.net/sunflower_sara/article/details/80686375