fix gh-2262. Fix crash cause by using cudnn when we shouldn't
[TESTS] fix tests following change of default behavior
Merge pull request #2264 from nouiz/crash_fix_dnn

fix gh-2262. Fix crash cause by using cudnn when we shouldn't