提交 2c57dd29 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Disabled some more old warnings in tests

上级 b4c10047
......@@ -254,6 +254,10 @@ def makeTester(name, op, expected, checks = {}, good = {}, bad_build = {},
def test_grad(self):
if skip:
raise SkipTest(skip)
# Disable old warning that may be triggered by this test.
backup = config.warn.config.warn.sum_div_dimshuffle_bug
config.warn.config.warn.sum_div_dimshuffle_bug = False
try:
for testname, inputs in self.grad.items():
inputs = [copy(input) for input in inputs]
inputrs = [value(input) for input in inputs]
......@@ -265,6 +269,8 @@ def makeTester(name, op, expected, checks = {}, good = {}, bad_build = {},
% (self.op, testname, inputs)
exc_value.args = exc_value.args + (err_msg, )
raise type, exc_value, traceback
finally:
config.warn.config.warn.sum_div_dimshuffle_bug = backup
Checker.__name__ = name
return Checker
......
......@@ -493,7 +493,13 @@ def create(window_size=3,
reconstruction_cost_function = quadratic,
tie_weights = False
)
backup = config.warn.sum_div_dimshuffle_bug
config.warn.sum_div_dimshuffle_bug = False
try:
model = architecture.make(input_size=input_dimension, input_representation_size=token_representation_size, hidden_representation_size=concatenated_representation_size, output_size=output_vocabsize, lr=lr, seed=seed, noise_level=noise_level, qfilter_relscale=qfilter_relscale, mode=compile_mode)
finally:
config.warn.sum_div_dimshuffle_bug = backup
return model
def create_realistic(window_size=3,#7,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论