0
点赞
收藏
分享

微信扫一扫

tensorflow2查看tensor的值

_LEON_ 2022-07-14 阅读 113


tensorflow2查看具体tensor的值

一般来说直接print就可以了,会有如下结果

tensorflow2查看tensor的值_tensorflow


tensorflow2查看tensor的值_tensorflow_02

但有时候会遇到不可抗力,这时候不要用tf.compat.v1,然后开会话去看了,直接用

tf.print(diff)

例子见图

tensorflow2查看tensor的值_tensorflow_03


tensorflow2查看tensor的值_tensorflow_04


举报

相关推荐

0 条评论