Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Reduce number of iterations
Browse files
app.py
CHANGED
|
@@ -149,7 +149,7 @@ def get_imgs(base_image_path, style_reference_image_path):
|
|
| 149 |
style_reference_image = preprocess_image(style_reference_image_path)
|
| 150 |
combination_image = tf.Variable(preprocess_image(base_image_path))
|
| 151 |
|
| 152 |
-
iterations =
|
| 153 |
for i in range(1, iterations + 1):
|
| 154 |
loss, grads = compute_loss_and_grads(combination_image, base_image, style_reference_image)
|
| 155 |
optimizer.apply_gradients([(grads, combination_image)])
|
|
|
|
| 149 |
style_reference_image = preprocess_image(style_reference_image_path)
|
| 150 |
combination_image = tf.Variable(preprocess_image(base_image_path))
|
| 151 |
|
| 152 |
+
iterations = 20
|
| 153 |
for i in range(1, iterations + 1):
|
| 154 |
loss, grads = compute_loss_and_grads(combination_image, base_image, style_reference_image)
|
| 155 |
optimizer.apply_gradients([(grads, combination_image)])
|