generated from giuluck/python-experiments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverfitting.py
39 lines (35 loc) · 927 Bytes
/
overfitting.py
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
import argparse
import logging
from experiments import FigureExperiment
log = logging.getLogger("lightning_fabric")
log.propagate = False
log.setLevel(logging.ERROR)
# build argument parser
parser = argparse.ArgumentParser(description='Plot the overfitting example')
parser.add_argument(
'-f',
'--folder',
type=str,
default='results',
help='the path where to search and store the results and the exports'
)
parser.add_argument(
'-e',
'--extensions',
type=str,
nargs='*',
default=['png'],
help='the extensions of the files to save'
)
parser.add_argument(
'--plot',
action='store_true',
help='whether to plot the results'
)
# parse arguments, build experiments, then export the results
args = parser.parse_args().__dict__
print("Starting experiment 'overfitting'...")
for k, v in args.items():
print(' >', k, '-->', v)
print()
FigureExperiment.overfitting(**args)