我是靠谱客的博主 秀丽机器猫,这篇文章主要介绍(1)tf中tensor和numpy,现在分享给大家,希望可以做个参考。

tensornumpy
使用tf.*定义的都是tensor,包括variableplaceholder以及tf.constanttfoperator操作也是返回tensor

numpytensor
使用tf.convert_to_tensor可将一个numpy转为tensor

tensornumpy
sess.run或者eval返回的任何张量都是numpy数组

tensornumpy具有相同的shape,表示为tuple()

转载自链接:https://www.jianshu.com/p/74012acd72fa

最后

以上就是秀丽机器猫最近收集整理的关于(1)tf中tensor和numpy的全部内容,更多相关(1)tf中tensor和numpy内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部