提交 ec3726ed authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Small changes to ease debugging

上级 d13064f7
...@@ -141,7 +141,12 @@ def std_fgraph(input_specs, output_specs, accept_inplace = False): ...@@ -141,7 +141,12 @@ def std_fgraph(input_specs, output_specs, accept_inplace = False):
break break
# We need to protect all immutable inputs from inplace operations. # We need to protect all immutable inputs from inplace operations.
fgraph.attach_feature(Supervisor(input for spec, input in zip(input_specs, inputs) if not (spec.mutable or (hasattr(fgraph, 'destroyers') and fgraph.destroyers(input))))) fgraph.attach_feature(
Supervisor(input
for spec, input in zip(input_specs, inputs)
if not (spec.mutable or
(hasattr(fgraph, 'destroyers') and
fgraph.destroyers(input)))))
# If named nodes are replaced, keep the name # If named nodes are replaced, keep the name
for feature in std_fgraph.features: for feature in std_fgraph.features:
......
...@@ -258,8 +258,8 @@ class t_gemm(TestCase): ...@@ -258,8 +258,8 @@ class t_gemm(TestCase):
def test_destroy_map4(self): def test_destroy_map4(self):
"""test that dot args can be aliased""" """test that dot args can be aliased"""
Z = shared(self.rand(2, 2)) Z = shared(self.rand(2, 2), name='Z')
A = shared(self.rand(2, 2)) A = shared(self.rand(2, 2), name='A')
one = T.constant(1.0).astype(Z.dtype) one = T.constant(1.0).astype(Z.dtype)
f = inplace_func([], gemm_inplace(Z, one, A, A, one)) f = inplace_func([], gemm_inplace(Z, one, A, A, one))
f() f()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论