调用tensorflow报错The TensorFlow library wasn't compiled to use SSE instructions的解决方案

An error ocurred while starting the kernel
2019?? 19:57:24.613654: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.615554: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.617215: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.618396: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.618959: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.619489: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.620166: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:24.620947: W c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2019?? 19:57:25.021410: I c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:940] Found device 0 with properties: 
name: Quadro K620
major: 5 minor: 0 memoryClockRate (GHz) 1.124
pciBusID 0000:01:00.0
Total memory: 2.00GiB
Free memory: 1.66GiB
2019?? 19:57:25.022058: I c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:961] DMA: 0 
2019?? 19:57:25.022386: I c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:971] 0: Y 
2019?? 19:57:25.022670: I c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) ‑> (device: 0, name: Quadro K620, pci bus id: 0000:01:00.0)
2019?? 19:57:28.259178: I c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) ‑> (device: 0, name: Quadro K620, pci bus id: 0000:01:00.0)
2019?? 19:57:36.555328: E c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\stream_executor\cuda\cuda_dnn.cc:359] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
2019?? 19:57:36.555717: E c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\stream_executor\cuda\cuda_dnn.cc:366] error retrieving driver version: Unimplemented: kernel reported driver version not implemented on Windows
2019?? 19:57:36.556225: E c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\stream_executor\cuda\cuda_dnn.cc:326] could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM
2019?? 19:57:36.556579: F c:\tf_jenkins\home\workspace\release‑win\m\windows‑gpu\py\35\tensorflow\core\kernels\conv_ops.cc:671] Check failed: stream‑>parent()‑>GetConvolveAlgorithms(&algorithms) 

如果报上面的错误,就新开一个kernel,输入以下代码:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf

就OK啦~
参考自:> https://github.com/tensorflow/tensorflow/issues/7778

这个问题的出现主要是和tensorflow的安装方式有关系,使用pip安装就会出现对代码编译优化的问题,使得你电脑有SSE4.1等命令,却无法调用来加速训练,所以最好是安装时候多费点事,能够解决这个报错提示的问题,同时也能在以后的项目中发挥本机CPU的性能进行加速训练。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值