Haaribo commited on
Commit
a12dd49
·
verified ·
1 Parent(s): 061a0da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -62,8 +62,8 @@ def genreate_intepriable_output(input,dataset="CUB2011", arch="resnet50",seed=12
62
  if folder is None:
63
  folder = Path(f"tmp/{arch}/{dataset}/{seed}/")
64
 
65
- state_dict = torch.load(folder / f"{model_type}_{n_features}_{n_per_class}_FinetunedModel.pth")
66
- selection= torch.load(folder / f"SlDD_Selection_50.pt")
67
  state_dict['linear.selection']=selection
68
 
69
  feature_sel, sparse_layer, current_mean, current_std, bias_sparse = extract_sel_mean_std_bias_assignemnt(state_dict)
 
62
  if folder is None:
63
  folder = Path(f"tmp/{arch}/{dataset}/{seed}/")
64
 
65
+ state_dict = torch.load(folder / f"{model_type}_{n_features}_{n_per_class}_FinetunedModel.pth", map_location=torch.device('cpu'))
66
+ selection= torch.load(folder / f"SlDD_Selection_50.pt", map_location=torch.device('cpu'))
67
  state_dict['linear.selection']=selection
68
 
69
  feature_sel, sparse_layer, current_mean, current_std, bias_sparse = extract_sel_mean_std_bias_assignemnt(state_dict)