please check whether you've installed cudatoolkit and cudnn correctly.
run this command to check your cuda nvcc -V
nvcc -V
determine whether your cuda directory includes the comparable version of cudnn