tolstikhin / wae

Wasserstein Auto-Encoders
BSD 3-Clause "New" or "Revised" License
505 stars 90 forks source link

Questions about wae_objective #11

Open ZhangYiyangKevin opened 5 years ago

ZhangYiyangKevin commented 5 years ago

Hi, Thank you so much for this nice implementation. However i have two questions about the objective function of wae:

  1. Can i think that 'l2sq' cost function equals to MSELoss in reconstruction_loss part?
  2. If the Qz has the same distribution with Pz,can i discard the penalty part in wae_objective? I‘m looking forward to your reply.

best wishes zhangyiyang

tolstikhin commented 5 years ago

Dear zhangyiyang,

  1. Yes, indeed, l2sq cost function is just a squared pixel-wise L2 cost, i.e. mean squared error loss.
  2. Make sure you are not confusing the individual posterior Q(Z|X) distributions with the aggregated posterior Qz distribution, which is an average of the point-wise posterior distributions. If you known for a fact that Qz is precisely matching (perhaps, by construction?), then indeed you can ignore the penalty part. However, to be honest, from top of my head I can't come up with any reasonable approaches leading to these type of situations...

I hope this helps, Ilya