Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py (#2)
Browse files
app.py
CHANGED
@@ -153,7 +153,7 @@ def get_imgs(base_image_path, style_reference_image_path):
|
|
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)])
|
156 |
-
if i %
|
157 |
print("Iteration %d: loss=%.2f" % (i, loss))
|
158 |
img = deprocess_image(combination_image.numpy())
|
159 |
return img
|
|
|
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)])
|
156 |
+
if i % 5 == 0:
|
157 |
print("Iteration %d: loss=%.2f" % (i, loss))
|
158 |
img = deprocess_image(combination_image.numpy())
|
159 |
return img
|