fix #6
Browse files
app.py
CHANGED
@@ -10,12 +10,11 @@ decoder = load_model("models/decoder.h5")
|
|
10 |
latent_dim = 128
|
11 |
import tensorflow as tf
|
12 |
|
13 |
-
noisy_image = tf.image.resize(noisy_image, (224, 224))
|
14 |
-
|
15 |
|
16 |
def add_gaussian_noise(image, noise_factor=0.2):
|
17 |
noisy_image = image + noise_factor * np.random.normal(size=image.shape)
|
18 |
noisy_image = np.clip(noisy_image, 0., 1.)
|
|
|
19 |
return noisy_image
|
20 |
|
21 |
def denoise_and_generate(image, num_images):
|
|
|
10 |
latent_dim = 128
|
11 |
import tensorflow as tf
|
12 |
|
|
|
|
|
13 |
|
14 |
def add_gaussian_noise(image, noise_factor=0.2):
|
15 |
noisy_image = image + noise_factor * np.random.normal(size=image.shape)
|
16 |
noisy_image = np.clip(noisy_image, 0., 1.)
|
17 |
+
noisy_image = tf.image.resize(noisy_image, (224, 224))
|
18 |
return noisy_image
|
19 |
|
20 |
def denoise_and_generate(image, num_images):
|