it should not. If this cause problem, it should raise an error. upd isn't a normal python dict, but a special class that will make sure we don't loose updates and give an error if the user would cause that behavior.
On Wed, Nov 23, 2016 at 3:13 PM, Shir Gur <[email protected]> wrote: > Will it ruin the update dictation of the scan procedure? > > On Wednesday, November 23, 2016 at 9:07:53 PM UTC+2, nouiz wrote: >> >> upd[W] = m >> >> should work. >> >> Fred >> >> On Wed, Nov 23, 2016 at 12:39 PM, Shir Gur <[email protected]> wrote: >> >>> Hi, >>> >>> i have my scan function, something like >>> >>> def _loop(i): >>> x = something with shared varibale W >>> return x, {W:x} >>> >>> >>> res, upd = theano.scan(fn=_loop, sequence=T.arange(10)) >>> >>> >>> so after each iteration the scan function updates *W* to be *x*. >>> >>> Now i have the following: >>> >>> m = T.argmx(res) >>> >>> func = theano.function([],[],updates=upd) >>> >>> but i want to update *W* to be *m* after each call to *func*, but the >>> update for *W* in is already exist. >>> >>> How can i blend in soething like: >>> upd = upd + [(W,m)] >>> >>> ? >>> >>> 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. > -- --- 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.
