Update Option of Theano Function -
i using theano tutorials of deep learning , have doubt regarding how theano function's update works. whatever parameters update defined take new value if of parameters changed?
theano.function( [i], cost, updates = updates, givens = { self.x: trainx[i*self.mbsize: (i+1)*self.mbsize], self.y: trainy[i*self.mbsize: (i+1)*self.mbsize] } ) updates defined
updates = [ (param, param-learnrate*grad) param, grad in zip(self.params, gradients) ] here learnrate not theano variable. question if change learnrate @ point of time theano function take changed value of learnrate or continue old value?
learnrate changed as
learnrate = learnrate/10 initially learnrate 0.05
it continue old value.
numbers immutable in python changing value of learnrate won't affect value being used in updates list, , guess once theano function compiled provided updates can not changed unless compile again new value.
as have known, can make learning rate theano variable , change value when want to.
here's question might useful, is there way change function's update list without re-compiling in theano?
Comments
Post a Comment