Newer
Older
from argparse import ArgumentParser
def set_constants(problem):
if problem == "Conway":
Knotind = ["0_1", "conway", "kt"]
Joseph Sleiman
committed
elif problem == "5Class":
Knotind = ['0_1', '3_1', '4_1', '5_1', '5_2']
elif problem == "SQRGRN8":
Knotind = ['3_1_3_1', '3_1-3_1', '8_20'] # square knot, granny knot, 8_20
elif problem == "10Crossings":
Knotind = [""]
Joseph Sleiman
committed
"""Receive user-input of training parameters via the command Line interface (CLI) and Python library argparse.
Default values are provided if no input is specified.
Returns:
Joseph Sleiman
committed
args: Values defining the knot parameters.
"""
par = ArgumentParser()
par.add_argument(
"-p",
"--problem",
type=str,
Joseph Sleiman
committed
default="Conway",
help="Options: Conway, 5Class, SQRGRN8, 10Crossings",
)
par.add_argument(
"-d",
"--datatype",
type=str,
default="Writhe",
Joseph Sleiman
committed
help="Options: 1DWrithe, Writhe, Sig_Writhe, LD, LC, LCW, XYZ",
)
par.add_argument(
"-a",
"--adjacent",
type=bool,
default=False,
help="Flag to use adjacent datatype from XYZ",
)
par.add_argument(
"-n",
"--normalised",
type=bool,
default=False,
help="Flag to use normalised version of datatype",
)
par.add_argument(
"-t",
"--network",
type=str,
default="FFNN",
help="Type of neural network: FFNN or RNN",
)
par.add_argument(
Joseph Sleiman
committed
"-e",
"--epochs",
type=int,
default=1000,
help="Set the number of training epochs"