提交 7331f83a authored 作者: Frederic Bastien's avatar Frederic Bastien

fix the handling of flag with case.

上级 e4383ac1
......@@ -92,16 +92,17 @@ class TheanoConfig(object):
self.config.set(sp[0],sp[1],val)
else:
found=0
sp=sp[0].lower()#the ConfigParser seam to use only lower letter.
for sec in self.config.sections():
for opt in self.config.options(sec):
if opt == sp[0]:
if opt == sp:
found+=1
section=sec
option=opt
if found==1:
self.config.set(section,option,val)
elif found>1:
raise Exception("Ambiguous option (%s) in THEANO_FLAGS"%(sp[0]))
raise Exception("Ambiguous option (%s) in THEANO_FLAGS"%(sp))
def __getitem__(self, key):
""":returns: a str with the value associated to the key"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论