ludusc commited on
Commit
7c97942
1 Parent(s): 2a4bd0a

torch utils from stylegan3

Browse files
backend/disentangle_concepts.py CHANGED
@@ -15,7 +15,7 @@ def get_separation_space(type_bin, annotations, df):
15
  svc = SVC(gamma='auto', kernel='linear')
16
  svc.fit(x_train, y_train)
17
  print(svc.score(x_val, y_val))
18
- imp_features = len(np.abs(svc.coef_) > 2)
19
  return svc.coef_, imp_features
20
 
21
  def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3, count=11):
 
15
  svc = SVC(gamma='auto', kernel='linear')
16
  svc.fit(x_train, y_train)
17
  print(svc.score(x_val, y_val))
18
+ imp_features = (np.abs(svc.coef_) > 2).sum()
19
  return svc.coef_, imp_features
20
 
21
  def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3, count=11):
requirements.txt CHANGED
@@ -13,5 +13,7 @@ tqdm==4.64.1
13
  transformers==4.25.1
14
  scikit-learn
15
  altair==4.0
16
- torch-utils
17
- opencv-python
 
 
 
13
  transformers==4.25.1
14
  scikit-learn
15
  altair==4.0
16
+ #torch-utils
17
+ opencv-python
18
+ stylegan3.dnnlib
19
+ stylegan3.torch_utils