The solution is to use and update shared variables instead of returning 
values.
Now I finally understand how Theano works.

On Monday, September 5, 2016 at 12:52:45 AM UTC+2, Kiuhnm Mnhuik wrote:
>
> I admit I didn't read Theano documentation very thoroughly, because I use 
> Lasagne and usually I don't need to know Theano very well.
>
> This time, I'd like to run a function twice and pass its outputs to 
> another function. In pseudo-code:
>
>     out1 = f(input1)
>     out2 = f(input2)
>     result = g(out1, out2)
>
> I see two sub-optimal solutions:
>
>    - compute out1, read its value, compute out2, read its value and then 
>    pass them to g
>    - duplicate f (f1 and f2)
>    
> Is there a better solution?
>

-- 

--- 
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