0
$\begingroup$

I have a code segment from this repo:

https://github.com/toshikwa/slac.pytorch/blob/master/slac/utils.py

enter image description here

I am reading a paper about Soft Actor-Critic, a reinforcement learning algorithm. They have you sample from a Gaussian Log distribution. I believe that would mean you use the PDF to sample from. I am making a lot of assumptions, so please correct me.

I found this post discussing taking a multivariate Gaussian pdf, making it log Gaussian.

Multivariate log-normal probabiltiy density function (PDF)

The problem is that equation listed doesn't seem to match the code.

enter image description here

Maybe I'm barking up the wrong tree.If I need to be more concise or give more information please let me know. Any direction would be so awesome.

To clarify, I'm trying to figure out where the code is pulling the formula for Gaussian log prob if it doesn't match the PDF.

$\endgroup$
4
  • $\begingroup$ What is your question? $\endgroup$
    – Sycorax
    May 9, 2023 at 2:28
  • $\begingroup$ What is the equation in the code, if it the log gaussian then why does it not match. $\endgroup$
    – chadmc
    May 9, 2023 at 2:33
  • 1
    $\begingroup$ But this isn't the multivariate distribution, but univariate. $\endgroup$
    – Tim
    May 9, 2023 at 11:07
  • $\begingroup$ The formula is correct. The code seems to omit the factors of $y_j^{-1}.$ $\endgroup$
    – whuber
    May 9, 2023 at 18:36

0