Fix exception raising when CTC_LIB is not defined

上级 aa9e1b73
......@@ -23,9 +23,7 @@ class ConnectionistTemporalClassification(gof.COp):
if self.computeGradient:
self.gradients = T.ftensor3(name="ctc_grad")
try:
self.ctcLibDir = os.environ["CTC_LIB"]
except KeyError:
if not "CTC_LIB" in os.environ:
raise EnvironmentError("CTC_LIB environment variable is not set.")
def c_lib_dirs(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论