-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmlp.py
More file actions
39 lines (30 loc) · 769 Bytes
/
mlp.py
File metadata and controls
39 lines (30 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
Main script of the project.
"""
import numpy as np
from mlp.parser import create_parser
from mlp import split, train, predict
def main() -> None:
"""
Main function of the script.
"""
parser = create_parser()
args = parser.parse_args()
if args.seed:
np.random.seed(args.seed)
match args.command:
case "split":
split(args.dataset, args.test_size, args.out_dir)
case "train":
train(
args.dataset,
args.model,
args.out_dir,
args.no_plot,
args.plot_n,
args.plot_raw,
)
case "predict":
predict(args.dataset, args.model)
if __name__ == "__main__":
main()