Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def text_to_face_generate(text):
|
|
113 |
optimizer_pi = Adam((pi,), lr=5e-3)
|
114 |
|
115 |
# optimization
|
116 |
-
for _ in range(
|
117 |
soft_pi = F.softmax(pi, dim=1)
|
118 |
w_prime = soft_pi * w
|
119 |
w_prime = w_prime.sum(dim=1)
|
@@ -160,7 +160,7 @@ def face_to_face_interpolate(image1, image2, interp_lambda=0.5):
|
|
160 |
optimizer_w = SGLD((w,), lr=1e-1, momentum=0.99, noise_std=0.01, device=device)
|
161 |
|
162 |
# optimization
|
163 |
-
for _ in range(
|
164 |
_, _, pred_clip_latent, _, _ = model(x=w, x_type='gan_latent', times_augment_pred_image=50)
|
165 |
|
166 |
l = loss(target_clip_latent, pred_clip_latent)
|
|
|
113 |
optimizer_pi = Adam((pi,), lr=5e-3)
|
114 |
|
115 |
# optimization
|
116 |
+
for _ in range(10):
|
117 |
soft_pi = F.softmax(pi, dim=1)
|
118 |
w_prime = soft_pi * w
|
119 |
w_prime = w_prime.sum(dim=1)
|
|
|
160 |
optimizer_w = SGLD((w,), lr=1e-1, momentum=0.99, noise_std=0.01, device=device)
|
161 |
|
162 |
# optimization
|
163 |
+
for _ in range(10):
|
164 |
_, _, pred_clip_latent, _, _ = model(x=w, x_type='gan_latent', times_augment_pred_image=50)
|
165 |
|
166 |
l = loss(target_clip_latent, pred_clip_latent)
|