提交 d7c414ab authored 作者: Razvan Pascanu's avatar Razvan Pascanu

removed some debugging code

上级 432ef124
...@@ -401,27 +401,17 @@ def scan(fn, sequences=[], outputs_info=[], non_sequences=[], ...@@ -401,27 +401,17 @@ def scan(fn, sequences=[], outputs_info=[], non_sequences=[],
# if the number of outputs to the function does not match the number of # if the number of outputs to the function does not match the number of
# assumed outputs # assumed outputs
# find the number of update rules from shared variables
n_update_rules = 0
for v in dummy_f.maker.expanded_inputs :
if isinstance(v.variable, theano.compile.SharedVariable) and v.update:
n_update_rules += 1
if len(inner_fn_out_states) != n_outs: if len(inner_fn_out_states) != n_outs:
if outs_info == []: if outs_info == []:
# We know how to deal with this case, assume that none of the outputs # We know how to deal with this case, assume that none of the outputs
# are required to have any sort of time taps # are required to have any sort of time taps
# we just need to update the number of actual outputs # we just need to update the number of actual outputs
print len(inner_fn_out_states), n_outs, n_update_rules
print inner_fn_out_states
n_outs = len(inner_fn_out_states) n_outs = len(inner_fn_out_states)
# other updates : # other updates :
for i in xrange(n_outs): for i in xrange(n_outs):
outs_info += [ dict() ] outs_info += [ dict() ]
else: else:
print outs_info
print inner_fn_out_states
print n_outs
raise ValueError('There has been a terrible mistake in our input arguments' raise ValueError('There has been a terrible mistake in our input arguments'
' and scan is totally lost. Make sure that you indicate for every ' ' and scan is totally lost. Make sure that you indicate for every '
' output what taps you want to use, or None, if you do not want to ' ' output what taps you want to use, or None, if you do not want to '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论