Hi Pascal, 

Don't know how, but I missed replying to this at the time. Thanks very much 
for answering my question. I think what confused me was having the scan in 
there instead of just doing a step of gibbs sampling. But of course it was 
required because the tutorial covers persistent contrastive divergence and 
multiple steps of Gibbs sampling instead of only CD1. Thanks again!

Jim

On Tuesday, 10 February 2015 21:57:09 UTC, Pascal Lamblin wrote:
>
> On Tue, Feb 10, 2015, Jim O' Donoghue wrote: 
> > Just re-implementing my RBM and using the tutorials on the site as a 
> > reference. Question: Why can't you just compute the gradient through 
> Gibbs 
> > sampling the functions instead of using scan and automatically 
> > differentiating the cost function like they do in the tutorial? 
>
> You could absolutely use scan to compute the gradient itself, instead of 
> computing the cost, and then taking the gradient. 
>
> Using theano.grad simply enables us to simply build at once the gradient 
> expressions for all of the parameters, whereas you would have to consider 
> the gradient wrt W, hbias, and vbias explicitly if you were computing all 
> gradient expressions through Gibbs sampling directly. 
>
> -- 
> Pascal 
>

-- 

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