首页 > 解决方案 > Anaconda 显示此错误,无法正确训练模型

问题描述

2021-02-03 19:46:53.571084: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] Internal: Invoking GPU asm compilation is supported on Cuda non-Windows platforms only
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.

当我尝试训练我的深度神经网络时,我遇到了上述错误。它不会停止训练,但第一次迭代不能正常工作。见下文:

Epoch 1/10
   1/1875 [..............................] - ETA: 0s - loss: 2.3001 - accuracy: 0.1250
WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.0000s vs `on_train_batch_end` time: 0.0116s). Check your callbacks.

帮我解决这个错误。

我正在使用 tensorflow 版本 2.3.0、cuda 工具包版本 10.1.243、cudnn 版本 7.6.5,并且我的电脑具有具有 Super Max-Q 设计的 NVDIA GEFORCE RTX 2070。

一些解决方案说降级 tensorflow 版本,但对于某些项目我需要 2.3.0,所以请任何人解决这个错误。

标签: pythontensorflow

解决方案


这是您的 Tensorflow 版本、NVIDA 驱动程序版本、CUDA 版本和 cuDNN 版本之间的兼容性问题。对于经过验证的硬件和软件兼容性的安装,请使用此链接:https ://www.tensorflow.org/install/gpu


推荐阅读