pytorch模型训练遇到RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)
具体错误如下:RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`Exception raised from createCublasHandle at ..\aten\src\ATen\cuda\CublasHandlePool.cpp:8 (most recent cal
·
具体错误如下:
RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`
Exception raised from createCublasHandle at ..\aten\src\ATen\cuda\CublasHandlePool.cpp:8 (most recent call first):
00007FF937A175A200007FF937A17540 c10.dll!c10::Error::Error [<unknown file> @ <unknown line number>]
00007FF8D454B20800007FF8D454A1D0 torch_cuda.dll!at::cuda::getCurrentCUDASparseHandle [<unknown file> @ <unknown line number>]
00007FF8D454AB3800007FF8D454A1D0 torch_cuda.dll!at::cuda::getCurrentCUDASparseHandle [<unknown file> @ <unknown line number>]
00007FF8D454B9C700007FF8D454B500 torch_cuda.dll!at::cuda::getCurrentCUDABlasHandle [<unknown file> @ <unknown line number>]
00007FF8D454B5A700007FF8D454B500 torch_cuda.dll!at::cuda::getCurrentCUDABlasHandle [<unknown file> @ <unknown line number>]
00007FF8D454356700007FF8D4542810 torch_cuda.dll!at::native::sparse_mask_cuda [<unknown file> @ <unknown line number>]
00007FF8D2EBD8AD00007FF8D2EBD810 torch_cuda.dll!THCudaBlas_Sgemm [<unknown file> @ <unknown line number>]
00007FF8D33CDB3800007FF8D33CD700 torch_cuda.dll!THNN_CudaSpatialConvolutionMM_updateGradInput [<unknown file> @ <unknown line number>]
00007FF8D45CF06600007FF8D454E400 torch_cuda.dll!at::native::set_storage_cuda_ [<unknown file> @ <unknown line number>]
00007FF8D39064FC00007FF8D3906220 torch_cuda.dll!at::native::slow_conv2d_backward_cuda [<unknown file> @ <unknown line number>]
00007FF8D45B9AE600007FF8D454E400 torch_cuda.dll!at::native::set_storage_cuda_ [<unknown file> @ <unknown line number>]
00007FF8D45A00D100007FF8D454E400 torch_cuda.dll!at::native::set_storage_cuda_ [<unknown file> @ <unknown line number>]
00007FF8CC619AC800007FF8CC58D9D0 torch_cpu.dll!at::native::mkldnn_sigmoid_ [<unknown file> @ <unknown line number>]
00007FF8CC6C276E00007FF8CC6C2660 torch_cpu.dll!at::thnn_conv2d_backward [<unknown file> @ <unknown line number>]
00007FF8CDA571A200007FF8CD90E010 torch_cpu.dll!torch::autograd::GraphRoot::apply [<unknown file> @ <unknown line number>]
00007FF8CC5E194100007FF8CC58D9D0 torch_cpu.dll!at::native::mkldnn_sigmoid_ [<unknown file> @ <unknown line number>]
00007FF8CC619AC800007FF8CC58D9D0 torch_cpu.dll!at::native::mkldnn_sigmoid_ [<unknown file> @ <unknown line number>]
00007FF8CC6C276E00007FF8CC6C2660 torch_cpu.dll!at::thnn_conv2d_backward [<unknown file> @ <unknown line number>]
00007FF8CD8889C800007FF8CD888630 torch_cpu.dll!torch::autograd::generated::ThnnConv2DBackward::apply [<unknown file> @ <unknown line number>]
00007FF8CD847E9100007FF8CD847B50 torch_cpu.dll!torch::autograd::Node::operator() [<unknown file> @ <unknown line number>]
00007FF8CDDAF9BA00007FF8CDDAF300 torch_cpu.dll!torch::autograd::Engine::add_thread_pool_task [<unknown file> @ <unknown line number>]
00007FF8CDDB03AD00007FF8CDDAFFD0 torch_cpu.dll!torch::autograd::Engine::evaluate_function [<unknown file> @ <unknown line number>]
00007FF8CDDB4FE200007FF8CDDB4CA0 torch_cpu.dll!torch::autograd::Engine::thread_main [<unknown file> @ <unknown line number>]
00007FF8CDDB4C4100007FF8CDDB4BC0 torch_cpu.dll!torch::autograd::Engine::thread_init [<unknown file> @ <unknown line number>]
00007FF901980A2700007FF90195A100 torch_python.dll!THPShortStorage_New [<unknown file> @ <unknown line number>]
00007FF8CDDABF1400007FF8CDDAB780 torch_cpu.dll!torch::autograd::Engine::get_base_engine [<unknown file> @ <unknown line number>]
00007FF957B114C200007FF957B11430 ucrtbase.dll!configthreadlocale [<unknown file> @ <unknown line number>]
00007FF95940703400007FF959407020 KERNEL32.DLL!BaseThreadInitThunk [<unknown file> @ <unknown line number>]
00007FF95A37D0D100007FF95A37D0B0 ntdll.dll!RtlUserThreadStart [<unknown file> @ <unknown line number>]
解决方法:
这个错误的原因就是二分类任务时在网络的最后没有加
‘sigmoid’
更多推荐
已为社区贡献1条内容
所有评论(0)