From 3f27107eafc98fa207cb19138b1b3f5f2927206e Mon Sep 17 00:00:00 2001 From: jh Date: Sat, 8 May 2021 12:27:06 -0700 Subject: [PATCH 1/4] fix bug --- models/Model_SAEHD/Model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 16630da..33eaf1d 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -580,7 +580,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... x = tf.cast(x, tf.float32) x = tf.math.scalar_mul(1-smoothing, x) # x = x + (smoothing/num_labels) - x = tf.reshape(x, (self.batch_size,) + tensor.shape[1:]) + x = tf.reshape(x, (self.batch_size,) + tensor.shape.as_list()[1:]) return x smoothing = self.options['gan_smoothing'] From c2bdf2652088e5a648a5ab574bf760ef05ba69c6 Mon Sep 17 00:00:00 2001 From: jh Date: Sat, 8 May 2021 12:37:27 -0700 Subject: [PATCH 2/4] fix --- models/Model_SAEHD/Model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 33eaf1d..3907a02 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -580,7 +580,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... x = tf.cast(x, tf.float32) x = tf.math.scalar_mul(1-smoothing, x) # x = x + (smoothing/num_labels) - x = tf.reshape(x, (self.batch_size,) + tensor.shape.as_list()[1:]) + x = tf.reshape(x, (self.batch_size,) + tensor.get_shape().as_list()[1:]) return x smoothing = self.options['gan_smoothing'] From 94a53c69c25a511048b1ea84d832b29fc7dcc5e2 Mon Sep 17 00:00:00 2001 From: jh Date: Sat, 8 May 2021 12:40:00 -0700 Subject: [PATCH 3/4] fix --- models/Model_SAEHD/Model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index 3907a02..e872ae1 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -580,7 +580,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... x = tf.cast(x, tf.float32) x = tf.math.scalar_mul(1-smoothing, x) # x = x + (smoothing/num_labels) - x = tf.reshape(x, (self.batch_size,) + tensor.get_shape().as_list()[1:]) + x = tf.reshape(x, (self.batch_size,) + tuple(tensor.get_shape().as_list()[1:])) return x smoothing = self.options['gan_smoothing'] From 2eb1de11f26161bdf258e78112944e4d54771af8 Mon Sep 17 00:00:00 2001 From: jh Date: Sat, 8 May 2021 14:06:01 -0700 Subject: [PATCH 4/4] Adds bug fix to changelog --- CHANGELOG.md | 5 +++++ models/Model_SAEHD/Model.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0aa859..5cfd954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.2] - 2021-05-08 +### Fixed +- Fixed bug with GAN smoothing/noisy labels with certain versions of Tensorflow + ## [1.6.1] - 2021-05-04 ### Fixed - Fixed bug when `fs-aug` used on model with same resolution as dataset @@ -88,6 +92,7 @@ This should help with rough areas directly next to the mask - Reset stale master branch to [seranus/DeepFaceLab](https://github.com/seranus/DeepFaceLab), 21 commits ahead of [iperov/DeepFaceLab](https://github.com/iperov/DeepFaceLab) ([compare](https://github.com/iperov/DeepFaceLab/compare/4818183...seranus:3f5ae05)) +[1.6.2]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.6.1...v1.6.2 [1.6.1]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.6.0...v1.6.1 [1.6.0]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.5.1...v1.6.0 [1.5.1]: https://github.com/faceshiftlabs/DeepFaceLab/compare/v1.5.0...v1.5.1 diff --git a/models/Model_SAEHD/Model.py b/models/Model_SAEHD/Model.py index e872ae1..9b9cd2d 100644 --- a/models/Model_SAEHD/Model.py +++ b/models/Model_SAEHD/Model.py @@ -145,7 +145,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ... default_gan_patch_size = self.options['gan_patch_size'] = self.load_or_def_option('gan_patch_size', self.options['resolution'] // 8) default_gan_dims = self.options['gan_dims'] = self.load_or_def_option('gan_dims', 16) default_gan_smoothing = self.options['gan_smoothing'] = self.load_or_def_option('gan_smoothing', 0.1) - default_gan_noise = self.options['gan_noise'] = self.load_or_def_option('gan_noise', 0.05) + default_gan_noise = self.options['gan_noise'] = self.load_or_def_option('gan_noise', 0.0) if self.is_first_run() or ask_override: self.options['models_opt_on_gpu'] = io.input_bool ("Place models and optimizer on GPU", default_models_opt_on_gpu, help_message="When you train on one GPU, by default model and optimizer weights are placed on GPU to accelerate the process. You can place they on CPU to free up extra VRAM, thus set bigger dimensions.")