There is no global registry of shared variable. You could make one by
modifing theano.shared() function call, but that could still miss some
corner cases.

If they have all the same shapes, you could copy them in a new numpy
ndarray and make a new shared variable with that.

There is the TypedList type in Theano, but scan don't understand it.

So, without modifing Theano, your only solution is to keep yourself tract
of the shared variable you create and do a computation graph in Theano
where you do the same computation on each shared variable.

l = list of all you shared var
res = []
for s in l:
   o = some_computation_on_a_shared_var(s)
   res.append(o)

f=theano.function([], o)

Fred

On Wed, Nov 23, 2016 at 3:53 PM, Shir Gur <[email protected]> wrote:

> Hi,
>
> I want to iterate over all my shared variables, i.e. by scan.
>
> a) is there a way to access them by index in some global attribute of
> theano?
> b) is there a way to pack them by tensor-variable (probably no because the
> have different shapes)?
>
> now i iterate them on CPU and execute theano function for each one.
>
> thanks
>
> --
>
> ---
> 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.
>

-- 

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