Day: October 15, 2019

解决Tensorflow 使用时cpu编译不支持警告

使用TensorFlow模块时,弹出错误Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 原因是下载TensorFlow的版本不支持cpu的AVX2编译。 可能是因为安装时使用的pip install tensorflow ,这样默认会下载X86_64的SIMD版本。 2.彻底解决,换成支持cpu用AVX2编译的TensorFlow版本。 首先,卸载原来版本的TensorFlow pip uninstall tensorflow 完成后可以用pip list查看一下所有库,检查是否成功卸载。 然后去github下载正确的tf版本,Windows点这里下载。其他操作系统可以点这里找到对应的版本。 博主用的win10,python3.6,所以选择如下图: 对应的path在上边的找到对应的.whl下载即可。 然后安装: 然后安装: 成功安装后,再次运行TensorFlow就不会报错啦~

blueidea