taesungp / contrastive-unpaired-translation

Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
https://taesung.me/ContrastiveUnpairedTranslation/
Other
2.2k stars 416 forks source link

External NCE Loss #67

Open BehzadBozorgtabar opened 3 years ago

BehzadBozorgtabar commented 3 years ago

I want to use an external NCE loss term using image patches from the rest of dataset (Eq. 4 in the paper). It is mentioned that MoCo has been used but I could not find the implementation in the repo. Besides, I guess we should set batch_dim_for_bmm = self.opt.batch_size in patchnce.py (Line 35).

Can you please guide me about this?

Ir1d commented 3 years ago

Shouldnt the batch_dim be set to self.opt.batch_size // len(self.opt.gpu_ids)