phlippe / uvadlc_notebooks

Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2023
https://uvadlc-notebooks.readthedocs.io/en/latest/
MIT License
2.59k stars 590 forks source link

Estimation of Contrastive Divergence(CD) #151

Open cong-g opened 1 month ago

cong-g commented 1 month ago

In Tutorial 8: Deep Energy-Based Generative Models, part of the CD is $𝔼{q\theta (x)}(\nabla\theta E\theta (x))$, but what the code is estimating seems to be $\nabla\theta(𝔼{q\theta (x)}( E\theta (x)))$ as shown in the screenshot

Screenshot 2024-10-28 at 14 56 12

am I wrong or this doesn't make a huge difference when it comes to gradient estimation