提交 433f3fe2 authored 作者: slefrancois's avatar slefrancois

add mode_for_cost for clarity

上级 2b9495a0
...@@ -1676,8 +1676,9 @@ def verify_grad(fun, pt, n_tests=2, rng=None, eps=None, ...@@ -1676,8 +1676,9 @@ def verify_grad(fun, pt, n_tests=2, rng=None, eps=None,
cost = theano.tensor.sum(t_r * o_output) cost = theano.tensor.sum(t_r * o_output)
if no_debug_ref: if no_debug_ref:
mode_for_cost=mode_not_debug(mode)
cost_fn = function(tensor_pt, cost, name='gradient.py cost', cost_fn = function(tensor_pt, cost, name='gradient.py cost',
mode=mode_not_debug(mode)) mode=mode_for_cost)
else: else:
cost_fn = function(tensor_pt, cost, name='gradient.py cost') cost_fn = function(tensor_pt, cost, name='gradient.py cost')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论