Hi,

I am trying to implement a mean covariance RBM class. I have two *shared 
variables Din, genSamp* and a 

*tensor variable x*I have a cost function as follows

cost, updates = mcrbm.get_cost_updates(lr = 0.01, persistent = None, k=1)

I have a theano function to iterate over 'x' as follows

train_rbm = theano.function(
        [index],
        cost,
        updates=updates, 
        givens={
            x: train_set_x[index * batch_size: (index + 1) * batch_size]
        },
        on_unused_input='warn',
        name='train_rbm'
    )

In the cost function, DIn undergoes some changes during negative sampling. 

With this setup, I intend to update genSamp over each iteration of 
train_rbm and use it for calculating the cost during RBM training

I tried the following lines of code inside the cost function to update 
genSamp

a.           self.genSamp.set_value(self.Din.get_value(borrow=True), 
borrow=True)

b.           self.genSamp = theano.shared(self.Din.get_value(borrow=True), 
borrow= True)
 
c.           updates[self.genSamp] = 
theano.shared(self.Din.get_value(borrow=True), borrow= True)

However, none of these lines are affecting genSamp and it is not updating 
after each iteration of the theano function (I am using a for loop, no 
theano.scan)

Am I missing something? Have I gone wrong in my understanding of some of 
theano's fundamental workings? If not, has this issue been raised before?

How can I update this genSamp shared variable?



-- 

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