RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED solution

Description of the problem: The code that has run through is replaced by another computer and an error occurs

Error code:

loss.backward()

 cuDNN error: CUDNN_STATUS_NOT_INITIALIZED

The cause of the problem and its solution;

1. cudnn does not correspond to cuda or pytorch, please check the corresponding relationship and reinstall (most likely not this)

2. The video memory required by the program is too large to cause an error, commonly known as burst video memory, try to reduce the batch-size

3. The error code is loss.backward(), please check whether the number of categories in the code corresponds to the number of categories in the data set

The error codes of solutions 2 and 3 may be loss.backward()..... Please check the code carefully~

Guess you like

Origin blog.csdn.net/imok1234567/article/details/132218485