2023-06-01 08:20:51 +00:00
|
|
|
import argparse
|
|
|
|
from argparse import ArgumentParser
|
|
|
|
|
|
|
|
# Construct an argument parser
|
|
|
|
all_args = argparse.ArgumentParser()
|
|
|
|
|
|
|
|
|
|
|
|
def makeArguments(arguments: ArgumentParser) -> dict:
|
|
|
|
all_args.add_argument("-b", "--Bayesian", action="store", dest="b",
|
2023-06-30 10:09:54 +00:00
|
|
|
type=int, choices=range(1, 8),
|
|
|
|
help="Bayesian model of size x")
|
2023-06-01 08:20:51 +00:00
|
|
|
all_args.add_argument("-f", "--Frequentist", action="store", dest="f",
|
2023-06-30 10:09:54 +00:00
|
|
|
type=int, choices=range(1, 8),
|
|
|
|
help="Frequentist model of size x")
|
2023-06-01 08:20:51 +00:00
|
|
|
all_args.add_argument("-E", "--EarlyStopping", action="store_true",
|
2023-06-30 10:09:54 +00:00
|
|
|
help="Early Stopping criteria")
|
2023-06-01 08:20:51 +00:00
|
|
|
all_args.add_argument("-e", "--EnergyBound", action="store_true",
|
2023-06-30 10:09:54 +00:00
|
|
|
help="Energy Bound criteria")
|
2023-06-01 08:20:51 +00:00
|
|
|
all_args.add_argument("-a", "--AccuracyBound", action="store_true",
|
2023-06-30 10:09:54 +00:00
|
|
|
help="Accuracy Bound criteria")
|
|
|
|
all_args.add_argument("-s", "--Save", action="store_true",
|
|
|
|
help="Save model")
|
|
|
|
all_args.add_argument('--net_type', default='lenet', type=str,
|
|
|
|
help='model = [lenet/AlexNet/3Conv3FC]')
|
|
|
|
all_args.add_argument('--dataset', default='CIFAR10', type=str,
|
|
|
|
help='dataset = [MNIST/CIFAR10/CIFAR100]')
|
2023-06-01 08:20:51 +00:00
|
|
|
return vars(all_args.parse_args())
|