您当前的位置: 首页 > 

川川菜鸟

暂无认证

  • 2浏览

    0关注

    969博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

tensorfolw很多的函数不能使用,具体解决方法:

川川菜鸟 发布时间:2020-10-12 16:07:26 ,浏览量:2

经过挣扎,我安装好了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)  
关注
打赏
1665165634
查看更多评论
立即登录/注册

微信扫码登录

0.3077s