提交 494ff73b authored 作者: AdeB's avatar AdeB

Print warnings when flags are not recognised

上级 556500bb
...@@ -8,6 +8,7 @@ import textwrap ...@@ -8,6 +8,7 @@ import textwrap
import re import re
import socket import socket
import struct import struct
import warnings
import theano import theano
from theano.configparser import (AddConfigVar, BoolParam, ConfigParam, EnumStr, from theano.configparser import (AddConfigVar, BoolParam, ConfigParam, EnumStr,
...@@ -1432,6 +1433,5 @@ AddConfigVar( ...@@ -1432,6 +1433,5 @@ AddConfigVar(
in_c_key=False) in_c_key=False)
# Check if there are remaining flags provided by the user through THEANO_FLAGS. # Check if there are remaining flags provided by the user through THEANO_FLAGS.
if THEANO_FLAGS_DICT: for key in THEANO_FLAGS_DICT.keys():
raise ValueError('theano does not recognise this flag: {}' warnings.warn('Theano does not recognise this flag: {}'.format(key))
.format(THEANO_FLAGS_DICT.keys()[0]))
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论