我是靠谱客的博主 真实身影,这篇文章主要介绍tensorflow2输出张量的值,现在分享给大家,希望可以做个参考。

使用.numpy()方法在torch里很管用,但是在tf2里报

AttributeError: 'Tensor' object has no attribute 'numpy'

查资料似乎tf.enable_eager_execution()能够解决问题,但是
只有tf1才有enable_eager_execution()方法

module 'tensorflow' has no attribute 'enable_eager_execution'

使用tf.print会报

'Tensor' object has no attribute '_datatype_enum'

最后

以上就是真实身影最近收集整理的关于tensorflow2输出张量的值的全部内容,更多相关tensorflow2输出张量内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(57)

评论列表共有 0 条评论

立即
投稿
返回
顶部