提交 73d6971b authored 作者: James Bergstra's avatar James Bergstra

removing print statements from makeTester

上级 321f45b8
...@@ -198,7 +198,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={}, ...@@ -198,7 +198,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={},
" making a node with inputs %s") % ( " making a node with inputs %s") % (
self.op, testname, inputs) self.op, testname, inputs)
exc.args += (err_msg,) exc.args += (err_msg,)
print err_msg
raise raise
try: try:
...@@ -207,7 +206,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={}, ...@@ -207,7 +206,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={},
err_msg = ("Test %s::%s: Error occurred while" err_msg = ("Test %s::%s: Error occurred while"
" trying to make a Function") % (self.op, testname) " trying to make a Function") % (self.op, testname)
exc.args += (err_msg,) exc.args += (err_msg,)
print err_msg
raise raise
if (isinstance(self.expected, dict) if (isinstance(self.expected, dict)
and testname in self.expected): and testname in self.expected):
...@@ -231,7 +229,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={}, ...@@ -231,7 +229,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={},
" the Function on the inputs %s") % ( " the Function on the inputs %s") % (
self.op, testname, inputs) self.op, testname, inputs)
exc.args += (err_msg,) exc.args += (err_msg,)
print err_msg
raise raise
if not isinstance(expecteds, (list, tuple)): if not isinstance(expecteds, (list, tuple)):
...@@ -286,7 +283,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={}, ...@@ -286,7 +283,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={},
" to make a node with inputs %s") % ( " to make a node with inputs %s") % (
self.op, testname, inputs) self.op, testname, inputs)
exc.args += (err_msg,) exc.args += (err_msg,)
print err_msg
raise raise
try: try:
...@@ -295,7 +291,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={}, ...@@ -295,7 +291,6 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={},
err_msg = ("Test %s::%s: Error occurred while trying" err_msg = ("Test %s::%s: Error occurred while trying"
" to make a Function") % (self.op, testname) " to make a Function") % (self.op, testname)
exc.args += (err_msg,) exc.args += (err_msg,)
print err_msg
raise raise
# Add tester return a ValueError. Should we catch only this # Add tester return a ValueError. Should we catch only this
...@@ -318,11 +313,10 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={}, ...@@ -318,11 +313,10 @@ def makeTester(name, op, expected, checks={}, good={}, bad_build={},
utt.verify_grad(self.op, inputs, utt.verify_grad(self.op, inputs,
mode=self.mode, mode=self.mode,
rel_tol=_grad_rtol) rel_tol=_grad_rtol)
except Exception: except Exception, exc:
err_msg = ("Test %s::%s: Error occurred while" err_msg = ("Test %s::%s: Error occurred while"
" computing the gradient on the following" " computing the gradient on the following"
" inputs: %s" ) % (self.op, testname, inputs) " inputs: %s" ) % (self.op, testname, inputs)
print err_msg
exc.args += (err_msg,) exc.args += (err_msg,)
raise raise
finally: finally:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论