关于tensorflow2.1.0-gpu+win10+anaconda环境下报错问题
问题来源
F tensorflow/stream_executor/lib/statusor.cc:34] Attempting to fetch value instead of handling error Internal: failed to get device attribute 13 for device 0: CUDA_ERROR_UNKNOWN: unknown error
在跑tensorflow官网的fashionmnist代码的时候一直报这个错误。
在CSDN上找到了同样的问题,但是没有办法得到解决。
有人说是因为GPU太差而导致的问题,但是我可以在Pytorch运行GPU。
所以应该不是显卡问题,我的显卡是1050,按理来说是没问题的。
解决方法
[link]https://github.com/tensorflow/tensorflow/issues/37186
在百度上始终搜不到合理的解答,我上google搜索了一下,发现github上很多人都在讨论这一问题,这位小哥说是显卡驱动版本过低导致的,我去官网下了最新的驱动,问题得到解决。所以提供思路:报错原理可能是显卡驱动版本过低导致。
看到成功的我眼泪掉下来
提供tensorflow2.1.0测试gpu的方法
tf.config.list_physical_devices('GPU')
如果可以使用gpu版本的话会这样显示:
gpu版本的安装是conda install tensorflow-gpu而不是conda install tensorflow