提交 18f2d661 authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't call dnn_version if user disable dnn!

上级 4e6177e7
...@@ -576,13 +576,14 @@ def use(device, ...@@ -576,13 +576,14 @@ def use(device,
cudnn_version = "not available" cudnn_version = "not available"
warn = None warn = None
try: try:
(hdr_v, runtime_v) = dnn_version() if dnn_available():
cudnn_version = runtime_v (hdr_v, runtime_v) = dnn_version()
# 4100 should not print warning with cudnn 4 final. cudnn_version = runtime_v
if cudnn_version > 4100: # 4100 should not print warning with cudnn 4 final.
warn = ("Your CuDNN version is more recent then Theano." if cudnn_version > 4100:
" If you see problems, try updating Theano or" warn = ("Your CuDNN version is more recent then Theano."
" downgrading CuDNN to version 4.") " If you see problems, try updating Theano or"
" downgrading CuDNN to version 4.")
except Exception: except Exception:
pass pass
print("Using gpu device %d: %s (CNMeM is %s, CuDNN %s)" % ( print("Using gpu device %d: %s (CNMeM is %s, CuDNN %s)" % (
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论