affinelayer / pix2pix-tensorflow

Tensorflow port of Image-to-Image Translation with Conditional Adversarial Nets https://phillipi.github.io/pix2pix/
MIT License
5.07k stars 1.3k forks source link

L1 loss on validation data #200

Open heidotrofimov opened 3 years ago

heidotrofimov commented 3 years ago

I modified the tensorflow 2 version of the code so that it now computes two L1 losses while training, one on training data and other on validation data. The code can be accessed here: https://github.com/affinelayer/pix2pix-tensorflow/pull/199

Would be nice if someone reviews the code and affirms that it does the right thing (I believe it does). It will use the generator twice, once on training data and once on validation data, and will compute accordingly two different L1 losses. Only the training data results are used in subsequent model training.