我运行了一个关于深度学习网络的代码,首先我训练了网络,它运行良好,但是运行到验证网络时出现此错误。
我有五个 epoch,每个 epoch 都有一个训练和验证的过程。我在第一个纪元验证时遇到了错误。所以我没有运行验证代码,我发现代码可以运行到第二个纪元并且没有错误。
我的代码:
for epoch in range(10,15): # epoch: 10~15
if(options["training"]["train"]):
trainer.epoch(model, epoch)
if(options["validation"]["validate"]):
#if(epoch == 14):
validator.epoch(model)
Run Code Online (Sandbox Code Playgroud)

我觉得验证代码可能有一些错误。但我找不到那个。
我在我的 Linux 服务器上运行一个深度学习程序,突然出现这个错误。
UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at /opt/conda/conda-bld/pytorch_1603729096996/work/c10/cuda/CUDAFunctions.cpp:100.)
早些时候,当我刚刚创建这个 conda 环境时,torch.cuda.is_available()返回后true我可以使用 CUDA 和 GPU。但突然间我无法使用 CUDA 并torch.cuda.is_available()返回false。我该怎么办?
附:我使用 GeForce RTX 3080 和 cuda 11.0 + pytorch 1.7.0。它以前有效,但现在没有了。
我在添加GTX 560 Ti后安装了nvidia-driver-390我在运行 Kubuntu 20.04 LTS 的 Intel Core i5 12600K PC 上
\n重新启动后,我收到以下错误:
\n$ dmesg|grep -i nvrm -A3\n[ 113.647054] NVRM: API mismatch: the client has the version 460.91.03, but\n NVRM: this kernel module has the version 390.144. Please\n NVRM: make sure that this kernel module and all NVIDIA driver\n NVRM: components have the same version.\nRun Code Online (Sandbox Code Playgroud)\n如何将客户端版本设置为 390.144?
\n较新的驱动程序,例如nvidia-driver-460似乎不支持此显卡。我还收到警告:
\n$ ubuntu-drivers devices\nWARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot …Run Code Online (Sandbox Code Playgroud)