          self.use_lsgan = True
          self.use_mixup = True
          self.mixup_alpha = 0.2
          self.use_perceptual_loss = perceptual_loss
  
          self.lrD = 1e-4 # Discriminator learning rate
          self.lrG = 1e-4 # Generator learning rate
  
          generator = GANTrainingDataGenerator(self.random_transform_args, 220, 6, 2)
          self.train_batchA = generator.minibatchAB(fn_A, batch_size)
 
</s> remove             fake_sz224 = tf.image.resize_images(fake_rgb, [224, 224])
 </s> add             if self.use_mask_refinement:
                fake_sz224 = tf.image.resize_images(fake, [224, 224])
            else:
                fake_sz224 = tf.image.resize_images(fake_rgb, [224, 224])
 </s> remove         loss_G += K.mean(K.abs(fake_rgb - real))
 </s> add         if self.use_mask_refinement:
            loss_G += K.mean(K.abs(fake - real))
        else:
            loss_G += K.mean(K.abs(fake_rgb - real))
 </s> remove         #TODO check "Tips for mask refinement (optional after >15k iters)" => https://render.githubusercontent.com/view/ipynb?commit=87d6e7a28ce754acd38d885367b6ceb0be92ec54&enc_url=68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f7368616f616e6c752f66616365737761702d47414e2f383764366537613238636537353461636433386438383533363762366365623062653932656335342f46616365537761705f47414e5f76325f737a3132385f747261696e2e6970796e62&nwo=shaoanlu%2Ffaceswap-GAN&path=FaceSwap_GAN_v2_sz128_train.ipynb&repository_id=115182783&repository_type=Repository#Tips-for-mask-refinement-(optional-after-%3E15k-iters)
 </s> add  </s> remove         loss_GA += 3e-3 * K.mean(K.abs(mask_A))
        loss_GB += 3e-3 * K.mean(K.abs(mask_B))
 </s> add         if self.use_mask_refinement:
            loss_GA += 1e-3 * K.mean(K.square(mask_A))
            loss_GB += 1e-3 * K.mean(K.square(mask_B))
        else:
            loss_GA += 3e-3 * K.mean(K.abs(mask_A))
            loss_GB += 3e-3 * K.mean(K.abs(mask_B))

        self.use_mask_refinement = False #OPTIONAL After 15k iteration**

          self.use_lsgan = True
          self.use_mixup = True
          self.mixup_alpha = 0.2
          self.use_perceptual_loss = perceptual_loss
        self.use_mask_refinement = False #OPTIONAL After 15k iteration**
  
          self.lrD = 1e-4 # Discriminator learning rate
          self.lrG = 1e-4 # Generator learning rate
  
          generator = GANTrainingDataGenerator(self.random_transform_args, 220, 6, 2)
          self.train_batchA = generator.minibatchAB(fn_A, batch_size)
keep keep keep add keep keep keep keep keep keep
 Mask refinement option for GAN128 (#308)

I was experimenting on GAN128 and saw that mask refinement option was missing so i added that.
Its default value is False and its optional after 15k iterations.

Based on this: https://render.githubusercontent.com/view/ipynb?commit=87d6e7a28ce754acd38d885367b6ceb0be92ec54&enc_url=68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f7368616f616e6c752f66616365737761702d47414e2f383764366537613238636537353461636433386438383533363762366365623062653932656335342f46616365537761705f47414e5f76325f737a3132385f747261696e2e6970796e62&nwo=shaoanlu%2Ffaceswap-GAN&path=FaceSwap_GAN_v2_sz128_train.ipynb&repository_id=115182783&repository_type=Repository#Tips-for-mask-refinement-(optional-after-%3E15k-iters) 
plugins/Model_GAN128/Trainer.py