admin管理员组文章数量:1650876
1、项目场景:
在测试tensorflow安装是否成功时,出现以下问题,虽然不影响程序的运行,还是好奇的查了下解决办法。
“I tensorflow
/core/platform/cpu_feature_guard:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.”
2、原因分析:
报错代码:
I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
表明 CPU 支持AVX AVX2 (可以加速CPU计算),但是你安装的 TensorFlow 版本不支持
3、解决方案:
1、可以忽略,或者加代码忽视这些问题。
2、如果想解决这个问题,可以卸载原来版本的tensorflow,安装cuda和cudnn
和tensorflow对应的版本,链接地址:GPU对应cuda。
卸载使用命令如下:
pip uninstall tensorflow
完成后可以用pip list查看一下所有库,检查是否成功卸载。
安装tensorflow,进入anaconda创建的虚拟环境
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu
本文标签: 指令高级tensorflowCPU
版权声明:本文标题:TensorFlow 未使用高级 CPU 指令,CPU存在警告:I tensorflowcoreplatformcpu_feature_guard.cc:193] I tensorflow. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729532807a1205023.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论