From 69d011e0f41b3489c766d51537be21ce0dd9ff45 Mon Sep 17 00:00:00 2001 From: Arthur Date: Mon, 27 Jan 2025 10:42:33 +0100 Subject: [PATCH] Update dcgan.ipynb Thank you for this great book and your hard work! I really appreciate the insights you've shared. I have a small question regarding the label smoothing implementation. I believe the signs might need to be swapped. Shouldn't real labels be slightly lower than 1, and fake labels be slightly higher than 0 (instead of negative values)? Thanks --- notebooks/04_gan/01_dcgan/dcgan.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebooks/04_gan/01_dcgan/dcgan.ipynb b/notebooks/04_gan/01_dcgan/dcgan.ipynb index cc14d8d..27ef75a 100644 --- a/notebooks/04_gan/01_dcgan/dcgan.ipynb +++ b/notebooks/04_gan/01_dcgan/dcgan.ipynb @@ -287,11 +287,11 @@ " )\n", "\n", " real_labels = tf.ones_like(real_predictions)\n", - " real_noisy_labels = real_labels + NOISE_PARAM * tf.random.uniform(\n", + " real_noisy_labels = real_labels - NOISE_PARAM * tf.random.uniform(\n", " tf.shape(real_predictions)\n", " )\n", " fake_labels = tf.zeros_like(fake_predictions)\n", - " fake_noisy_labels = fake_labels - NOISE_PARAM * tf.random.uniform(\n", + " fake_noisy_labels = fake_labels + NOISE_PARAM * tf.random.uniform(\n", " tf.shape(fake_predictions)\n", " )\n", "\n",