merve HF staff commited on
Commit
97415df
1 Parent(s): 10c794f

Reduce number of iterations

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = 400
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)])