khanrc / miro

Official PyTorch implementation of MIRO (ECCV 2022)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A question about the equations.

Y-J-Zhang opened this issue · comments

Thanks for ur interesting and efficient work, but i do not understand the trasformation from Equation (5) to Equation (6), especially for the expectation term. I am not good at math, and i will appreciate it if u could give me a hand or a guidence. THANK YOU!

And I found the similar transformation also happend in Equation (8) and Equation (9), I do not know what technique u used. My poor math. ⊙︿⊙

Hi!

The transformation from (5) to (6) can be done by using a probability density function (pdf) of a multivariate Gaussian distribution.
In our paper, we model the distribution $q(Z_{f^{0}}|Z_{f})$ as a Gaussian distribution as follows,

$$ q(Z_{f^{0}}|Z_{f}) = \frac{1}{(2\pi)^{d/2}|\Sigma|^{1/2}}\exp\left( - \frac{1}{2}( Z_{f^{0}} - \mu )^{\intercal}\Sigma^{-1} ( Z_{f^{0}} - \mu )\right) $$

where $\mu$ and $\Sigma$ are a mean vector and covariance matrix, and $|\Sigma|$ is a determinant of covariance matrix.

If we compute the log-likelihood, then,

$$ \log q(Z_{f^{0}}|Z_{f}) = - \log (2\pi)^{d/2} - \log |\Sigma|^{1/2} + \left( - \frac{1}{2}( Z_{f^{0}} - \mu )^{\intercal}\Sigma^{-1} ( Z_{f^{0}} - \mu )\right) = -\frac{d}{2}\log(2\pi) - \frac{1}{2}\log |\Sigma| - \frac{1}{2} | Z_{f^{0}} - \mu|_{\Sigma^{-1}}^{2} $$

The expectation term in (6) can be obtained by changing the sign of the log-likelihood.
In (6), we omitted the constant term $- \log (2\pi)^{d/2}$ since its gradient is zero. The same transformation is also used between (8) and (9).

ah! THANK YOU!!! Thanks for ur help 👍

ah! THANK YOU!!! Thanks for ur help 👍

你好,请问你之前的问题解决了吗,我这边出现了一个新问题,能否提供一下你的代码文件呢,谢谢!我的邮箱是02302561@jxnu.edu.cn