1. 程式人生 > >pytorch runtime error: CUDNN_STATUS_MAPPING_ERROR

pytorch runtime error: CUDNN_STATUS_MAPPING_ERROR

將訓好的模型的引數賦值給另外一個網路,
在測試賦值是否正確的時候,在

output = model(input)

一直報錯:

runtime error: CUDNN_STATUS_MAPPING_ERROR

In Cudnn documentation about this particular error:
CUDNN_STATUS_MAPPING_ERROR
An access to GPU memory space failed, which is usually caused by a failure to bind a texture.
To correct: prior to the function call, unbind any previously bound textures.
Otherwise, this may indicate an internal error/bug in the library.

model = model.cuda()

就解決了。