Q-bert commited on
Commit
d768679
1 Parent(s): 7994223

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ gender_map = {'Male': 0, 'Female': 1}
29
 
30
  def generate_faces(age, ethnicity, gender):
31
 
32
- random_z = torch.randn(num_faces_to_generate, z_dim).to(device)
33
 
34
 
35
  random_z[:, 0] = age
@@ -37,7 +37,7 @@ def generate_faces(age, ethnicity, gender):
37
  random_z[:, 2] = gender_map[gender]
38
 
39
 
40
- random_z[:, 3:] = torch.randn(num_faces_to_generate, z_dim - 3).to(device)
41
  with torch.no_grad():
42
  generated_faces = generator(random_z)
43
 
 
29
 
30
  def generate_faces(age, ethnicity, gender):
31
 
32
+ random_z = torch.randn(num_faces_to_generate, z_dim)
33
 
34
 
35
  random_z[:, 0] = age
 
37
  random_z[:, 2] = gender_map[gender]
38
 
39
 
40
+ random_z[:, 3:] = torch.randn(num_faces_to_generate, z_dim - 3)
41
  with torch.no_grad():
42
  generated_faces = generator(random_z)
43