forked from shreyasrajesh/face-reconstruction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.py
45 lines (41 loc) · 1.13 KB
/
train.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
40
41
42
43
44
45
import argparse
from src.models import skipnet
from src.models import sfsnet
def main(args):
skipnet.train(args.skipnet_batch_size, args.skipnet_learning_rate, args.skipnet_epochs)
skipnet.predict(args.skipnet_batch_size, args.skipnet_learning_rate)
sfsnet.train(args.sfsnet_batch_size, args.sfsnet_learning_rate, args.sfsnet_epochs)
#sfsnet.predict(args.sfsnet_batch_size, args.sfsnet_learning_rate) # first argument is test data
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
"--skipnet_batch_size",
type=int,
default=50,
help="Skipnet batch size")
parser.add_argument(
"--skipnet_learning_rate",
type=float,
default=0.00001,
help="Skipnet learning rate")
parser.add_argument(
"--skipnet_epochs",
type=int,
default=50,
help="Skipnet total epochs")
parser.add_argument(
"--sfsnet_batch_size",
type=int,
default=50,
help="sfsnet batch size")
parser.add_argument(
"--sfsnet_learning_rate",
type=float,
default=0.00001,
help="sfsnet learning rate")
parser.add_argument(
"--sfsnet_epochs",
type=int,
default=50,
help="sfsnet total epochs")
main(parser.parse_args())