You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
z = torch.narrow(z, dim=1, start=0, length=3) # slice for MI
mi = torch.mean(M(z, x_tilde)) - torch.log(torch.mean(torch.exp(M(z_bar, x_tilde)))+1e-8)
loss -= 0.01 * mi
`
Since z is a gaussian distribution, the dimensional of z is [B, feature_dim], and x_tilde is the output of the Generator network. When we calculate Mutual Information of them, we use the above code. I wonder why we use the narrow function and what is purpose of it. Meanwhile, I also wonder why the length=3, why we use 3 instead of the feature_dim of z.
Thanks!
The text was updated successfully, but these errors were encountered:
https://github.com/sungyubkim/MINE-Mutual-Information-Neural-Estimation-/blob/master/GAN_VDB_MINE.ipynb
In the above url In [11]. the code:
`
`
Since z is a gaussian distribution, the dimensional of z is [B, feature_dim], and x_tilde is the output of the Generator network. When we calculate Mutual Information of them, we use the above code. I wonder why we use the narrow function and what is purpose of it. Meanwhile, I also wonder why the length=3, why we use 3 instead of the feature_dim of z.
Thanks!
The text was updated successfully, but these errors were encountered: