Bravo, this problem seems to be solved.
But when I run your code above on my GPU it shows:
RuntimeError: cuDNN requires contiguous weight tensor

while it works on CPU, and works on GPU if I replace conv to linear(keeping transpose unchanged). Does this error attribute to the transposing operation on convolution, and rules of CUDA?