Ultimately, our goal is to match corresponding input-output patches at a specific location. Other patches from within the input image are leveraged as negatives. As previously mentioned, we are aiming to achieve shared content not only between the images as a whole but also the corresponding patches within the image. To achieve this we use PatchNCE [1]} loss:
\(\mathcal {L}_{\textup {PatchNCE}}(G,H,X)=\mathbb {E}_{x\sim X}\sum _{l=1}^L\sum _{s=1}^{S_l}\ell (\hat{z}_l^s,z_l^s,z_l^{S\backslash s}).\) 
