DeepFillv2_Pytorch icon indicating copy to clipboard operation
DeepFillv2_Pytorch copied to clipboard

The hyperparameters of loss functions are not the same as the official tensorflow implementation.

Open AlonzoLeeeooo opened this issue 2 years ago • 2 comments

Hi there,

I have noticed that you have set the ratio between l1 loss, perceptual loss and adversarial loss as 100: 10: 1, which is not the same as the official implementation. The tensorflow official implementation set l1 loss: adversarial loss = 1: 1. Are you sure this ensure the reproducibility? I really doubt that.

By the way, mmediting version code also set l1 loss: adversarial loss = 1: 0.1. I have tried the ratio of 1: 1. But the model easily collapse. Does anyone know what cause this problem? Is it lead by the difference between PyTorch and TensorFlow?

AlonzoLeeeooo avatar May 09 '22 12:05 AlonzoLeeeooo

Hi there,

I have noticed that you have set the ratio between l1 loss, perceptual loss and adversarial loss as 100: 10: 1, which is not the same as the official implementation. The tensorflow official implementation set l1 loss: adversarial loss = 1: 1. Are you sure this ensure the reproducibility? I really doubt that.

By the way, mmediting version code also set l1 loss: adversarial loss = 1: 0.1. I have tried the ratio of 1: 1. But the model easily collapse. Does anyone know what cause this problem? Is it lead by the difference between PyTorch and TensorFlow?

I also find the same problem. My inpainting model trainied by TensorFlow works well. However, when I use PyTorch to reproduce my inpainting network, it also very different with my TensorFlow model with the same loss weights. Maybe the reason is the difference bewteen PyTorch and TensorFlow.

Mengmengbai avatar Oct 09 '22 08:10 Mengmengbai

Hi there, I have noticed that you have set the ratio between l1 loss, perceptual loss and adversarial loss as 100: 10: 1, which is not the same as the official implementation. The tensorflow official implementation set l1 loss: adversarial loss = 1: 1. Are you sure this ensure the reproducibility? I really doubt that. By the way, mmediting version code also set l1 loss: adversarial loss = 1: 0.1. I have tried the ratio of 1: 1. But the model easily collapse. Does anyone know what cause this problem? Is it lead by the difference between PyTorch and TensorFlow?

I also find the same problem. My inpainting model trainied by TensorFlow works well. However, when I use PyTorch to reproduce my inpainting network, it also very different with my TensorFlow model with the same loss weights. Maybe the reason is the difference bewteen PyTorch and TensorFlow.

Okay then. Guess using TensorFlow version of code for training would reproduce the reported result more precisely than PyTorch does.

AlonzoLeeeooo avatar Oct 09 '22 10:10 AlonzoLeeeooo