ludusc commited on
Commit
69c766f
1 Parent(s): 8160618

perp vector

Browse files
Files changed (1) hide show
  1. backend/disentangle_concepts.py +2 -0
backend/disentangle_concepts.py CHANGED
@@ -34,6 +34,8 @@ def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3
34
  device = torch.device('cpu')
35
  G = model.to(device) # type: ignore
36
 
 
 
37
  # Labels.
38
  label = torch.zeros([1, G.c_dim], device=device)
39
 
 
34
  device = torch.device('cpu')
35
  G = model.to(device) # type: ignore
36
 
37
+ if True:
38
+ decision_boundary = z - (np.dot(z, decision_boundary) / np.dot(decision_boundary, decision_boundary)) * decision_boundary
39
  # Labels.
40
  label = torch.zeros([1, G.c_dim], device=device)
41