Understood that the arguments have to be in the order: sequences, outputs, 
non_sequences.

results, updates=scan(fn=lambda val,a,b: [a, b], outputs_info=[a_init,b_init], 
sequences=[t_val]) 



produces the desired output.



On Saturday, July 16, 2016 at 7:44:45 PM UTC+5:30, [email protected] 
wrote:
>
> I'm unable to understand what is wrong in the following code. I have two 
> variables and a list of values. I start with a state and want to maintain 
> the state as long as the sequence runs. I am not able to comprehend what's 
> going on. Please help me understand what I'm missing. 
>
>
> results, updates=scan(fn=lambda a,b,val: [a, b], 
> outputs_info=[a_init,b_init], sequences=[t_val])
>
> f=function([a_init,b_init,t_val], results)
>
> f(3,4,[5,6,7])
>
> expected op: [[3,3,3], [4,4,4]]
>
> produced op: [[5, 6, 7], [3, 5, 6]]
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to