Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
model = get_model(args.model, 'prune', data_object.num_classes, data_object.insize)
# state = torch.load(f"checkpoints/{args.model}_{args.dataset}_pretrained.pth")
# state = torch.load("../resnet152-b121ed2d.pth")
# model.load_state_dict(state['state_dict'], strict=False)
# model.load_state_dict(state, strict=False)

############################### preparing for pruning ###################################

Expand Down Expand Up @@ -187,4 +187,4 @@ def test(model, loss_fn, optimizer, phase, epoch):

df_data=np.array([remaining_before_pruning, remaining_after_pruning, valid_accuracy, pruning_accuracy, pruning_threshold, problems]).T
df = pd.DataFrame(df_data,columns = ['Remaining before pruning', 'Remaining after pruning', 'Valid accuracy', 'Pruning accuracy', 'Pruning threshold', 'problems'])
df.to_csv(f"logs/{name}.csv")
df.to_csv(f"logs/{name}.csv")