From a03741e1a544a746f9fc13828c60155f3094d7c4 Mon Sep 17 00:00:00 2001 From: krishagrawal112 Date: Wed, 29 Mar 2023 18:02:42 +0100 Subject: [PATCH] Pre-run for one threshold --- imagenet_main.py | 1 + run.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imagenet_main.py b/imagenet_main.py index fd0c11f..7917c90 100644 --- a/imagenet_main.py +++ b/imagenet_main.py @@ -142,6 +142,7 @@ def imagenet_main(): replace_with_vanilla_convolution(model, window_size=args.ma_window_size) replace_with_variable_relu(model, threshold=args.relu_threshold) validate(calibrate_loader, model, criterion, args.print_freq) + validate(val_loader, model, criterion) output_sparsity_to_csv(args.arch, model, args.output_path) if __name__ == '__main__': diff --git a/run.py b/run.py index 74975d2..d88de1e 100644 --- a/run.py +++ b/run.py @@ -45,7 +45,7 @@ ''' -sweep_range = [0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10] +sweep_range = [0.001] #, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10] for relu_threshold in sweep_range: test_name = "sparsity_run_relu_threshold" + str(relu_threshold)