tensorfolw很多的函数不能使用,具体解决方法:
【摘要】
经过挣扎,我安装好了tensorflow,但是运行还是出现警告:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
就是说我不能完全使用AVX2
原来代码:
import tensorflow as t...
经过挣扎,我安装好了tensorflow,但是运行还是出现警告:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
就是说我不能完全使用AVX2
原来代码:
-
import tensorflow as tf # 导入TensorFlow的包
-
-
s= tf.constant([[1, 2, 3], [4, 5, 6]]) # 这里定义了一个Tensor
-
print("s", s)
解决方案:忽略警告就好了,于是我们在原来代码加入新的部分:
-
import os
-
-
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
所以新的代码为:
-
import tensorflow as tf # 导入TensorFlow的包
-
import os
-
-
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
-
s= tf.constant([[1, 2, 3], [4, 5, 6]]) # 这里定义了一个Tensor
-
print("s", s)
文章来源: chuanchuan.blog.csdn.net,作者:川川菜鸟,版权归原作者所有,如需转载,请联系作者。
原文链接:chuanchuan.blog.csdn.net/article/details/109029748
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)