edadaltocg commited on
Commit
ca1cdc2
1 Parent(s): 3b3292c

lfs track centroids

Browse files
Files changed (2) hide show
  1. .gitattributes +1 -0
  2. app.py +3 -1
.gitattributes CHANGED
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ centroids_resnet50.tv2_in1k_igeood_logits.pt filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -47,7 +47,9 @@ features_names = [penultimate_features_key, logits_key]
47
 
48
  feature_extractor = create_feature_extractor(model, features_names)
49
 
50
- centroids = torch.from_numpy(pickle.load(open("centroids_resnet50.tv2_in1k_igeood_logits.pkl", "rb"))).to(device)
 
 
51
  # OOD detector thresholds
52
  msp_threshold = 0.3796
53
  energy_threshold = 0.3781
 
47
 
48
  feature_extractor = create_feature_extractor(model, features_names)
49
 
50
+
51
+ # load centroids
52
+ centroids = torch.load("centroids_resnet50.tv2_in1k_igeood_logits.pt")
53
  # OOD detector thresholds
54
  msp_threshold = 0.3796
55
  energy_threshold = 0.3781