kkjh0723:

In order to turn off the cudnn, I make cudnn.benchmark=False . I’m not sure it is right way.


No, you should use torch.backends.cudnn.enabled = False.
Your code will only disable the benchmark mode, which tries to find the fastest kernel.
The accuracy drop can be explained by the wrong answers of the current cudnn kernels, so stick to the custom conv approach or disable cudnn (you would have to profile it again unfortunately).