Skip to content

Commit f94a43b

Browse files
author
Keivan Rezaei
committed
update guidline
1 parent 2ee9182 commit f94a43b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

guideline.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,29 @@ Here `--dataset` can be `mnist`, `cifar` and `gtsrb`, which are benchmarks evalu
1212
### Training the base learners
1313
```
1414
cd train
15-
python3 FiniteAggregation_train_cifar_nin_baseline.py --k=50 --d=16 --start=0 --range=800
15+
python3 FiniteAggregation_train_cifar_nin_baseline.py --k=50 --d=16 --start=0 --range=800 --version 1
1616
```
17-
Here `--k` and `--d` are the same as above, and a total of $k\cdot d$ base learners will be trained independently. `--start` and `--range` specify which base learners are trained with this script: For instance, when one uses `--k=50` and `--d=16`, one can use `--start=0` and `--range=800` to train all base learners sequentially, or one can use two separate runs with repsectively `--start=0` and `--start=400` (both with `--range=400`) to train in parallel the first 400 and the last 400 base learners.
17+
Here `--k` and `--d` are the same as above, and a total of $k\cdot d$ base learners will be trained independently. `--start` and `--range` specify which base learners are trained with this script. Also, `--version` shows the version of base classifiers trained, version plays role in the initial seed of classifiers.
18+
For instance, when one uses `--k=50` and `--d=16`, one can use `--start=0` and `--range=800` to train all base learners sequentially, or one can use two separate runs with repsectively `--start=0` and `--start=400` (both with `--range=400`) to train in parallel the first 400 and the last 400 base learners.
1819
To train on MNIST and GTSRB, run `FiniteAggregation_train_mnist_nin_baseline.py` and `FiniteAggregation_train_gtsrb_nin_baseline.py` respectively.
1920

2021

2122
### Collecting predictions of base learners on test sets
2223
```
23-
python3 prediction/FiniteAggregation_evaluate_cifar_nin_baseline.py --models=cifar_nin_baseline_FiniteAggregation_k50_d16
24+
python3 prediction/FiniteAggregation_evaluate_cifar_nin_baseline.py --models=cifar_nin_baseline_FiniteAggregation_k50_d16 --version 1
2425
```
2526
For MNIST and GTSRB, run `FiniteAggregation_evaluate_mnist_nin_baseline.py` and `FiniteAggregation_evaluate_gtsrb_nin_baseline.py` instead.
27+
We note that `--version` refers to the version of classifiers that you're looking for their predictions.
2628

2729
### Computing the certified radius using the collected predictions
2830
These three lines of codes, find the certified radius based on methods:
2931
+ DPA+ROE
3032
+ FA+ROE
3133
+ FA.
3234
```
33-
python3 dpa_roe_cerfity.py --evaluations=cifar_nin_baseline_FiniteAggregation_k50_d1 --num_classes=10
34-
python3 fa_roe_cerfity.py --evaluations=cifar_nin_baseline_FiniteAggregation_k50_d16 --k=50 --d=16 --num_classes=10
35-
python3 fa_cerfity.py --evaluations=cifar_nin_baseline_FiniteAggregation_k50_d16 --k=50 --d=16 --num_classes=10
35+
python3 dpa_roe_cerfity.py --evaluations=cifar_nin_baseline_FiniteAggregation_k50_d1 --num_classes=10 --version 1
36+
python3 fa_roe_cerfity.py --evaluations=cifar_nin_baseline_FiniteAggregation_k50_d16 --k=50 --d=16 --num_classes=10 --version 1
37+
python3 fa_cerfity.py --evaluations=cifar_nin_baseline_FiniteAggregation_k50_d16 --k=50 --d=16 --num_classes=10 --version 1
3638
```
37-
Here `--num_classes` is the size of the label set on the evalauted dataset (i.e. `--num_classes=10` for MNIST and CIFAR-10 and `--num_classes=43` for GTSRB).
39+
Here `--num_classes` is the size of the label set on the evalauted dataset (i.e. `--num_classes=10` for MNIST and CIFAR-10 and `--num_classes=43` for GTSRB) and
40+
`--version` shows the version of classifiers you're looking for their certificates.

0 commit comments

Comments
 (0)