-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
https://github.com/sungyubkim/MINE-Mutual-Information-Neural-Estimation-/blob/master/GAN_VDB_MINE.ipynb
In the above url In [11]. the code:
`
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels