tmquan/RefineGAN

Why you calculate LossAB and LossBA?

hellopipu opened this issue · 2 comments

Hi,

Thanks for your code.

I can't understand the LossAB and LossBA here

Using the LossAB, you force the reconstructed images from sample B to be the same as sample A. It's hard for me to understand. Could you give me some hint or explanation on this.

And is it appropriate to conclude that the cyclic loss is just calculate the reconstruction loss from both image domain and k-space domain?

Hi, thank for asking.

As you can see in the scope of LossAB

G_loss_AB, D_loss_AB = self.build_losses(S1_dis_real, S2_dis_fake, name='AB')
G_loss_Ab, D_loss_Ab = self.build_losses(S1_dis_real, T2_dis_fake, name='Ab')

It only build the Adversarial loss of real sample (true) and output from the network (fake). It doesnot calculate the per-pixel reconstruction loss since S01 and S2 are different samples.

The cyclic loss implemented in this way is stochastic across samples (randomly drawing two from the datasets) and domains (image and frequency).

Hope that this addresses your question.

Thanks, I get it.