ludusc commited on
Commit
1f180c4
1 Parent(s): ef61173
Files changed (1) hide show
  1. backend/disentangle_concepts.py +1 -1
backend/disentangle_concepts.py CHANGED
@@ -91,7 +91,7 @@ def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3
91
  W = z.expand((14, -1)).unsqueeze(0)
92
 
93
  if layers:
94
- W_f = W.copy()
95
  W_f[layers] = W_0[layers]
96
  img = G.synthesis(W_f, noise_mode='const')
97
  else:
 
91
  W = z.expand((14, -1)).unsqueeze(0)
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: