ludusc commited on
Commit
13f53a4
1 Parent(s): 1f180c4
Files changed (1) hide show
  1. backend/disentangle_concepts.py +1 -1
backend/disentangle_concepts.py CHANGED
@@ -92,7 +92,7 @@ def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3
92
 
93
  if layers:
94
  W_f = torch.empty_like(W).copy_(W)
95
- W_f[layers] = W_0[layers]
96
  img = G.synthesis(W_f, noise_mode='const')
97
  else:
98
  img = G.synthesis(W_0, noise_mode='const')
 
92
 
93
  if layers:
94
  W_f = torch.empty_like(W).copy_(W)
95
+ W_f[:, layers, :] = W_0[:, layers, :]
96
  img = G.synthesis(W_f, noise_mode='const')
97
  else:
98
  img = G.synthesis(W_0, noise_mode='const')