Skip to content

Commit 6ed1414

Browse files
authored
Update main.py
1 parent 9cd81c4 commit 6ed1414

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/train/main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .freeze import freeze
55
from .config import config
66
from .test import test
7+
from .transform import transform
78

89
def main () :
910
parser = argparse.ArgumentParser(
@@ -15,6 +16,13 @@ def main () :
1516
# help="the output json file")
1617

1718
default_num_inter_threads = 0
19+
parser_transform = subparsers.add_parser('transform', help='pass parameters to another model')
20+
parser_transform.add_argument('-r', "--raw-model", default = "raw_frozen_model.pb", type=str,
21+
help = "the model receiving parameters")
22+
parser_transform.add_argument("-o","--old-model", default = "old_frozen_model.pb", type=str,
23+
help='the model providing parameters')
24+
parser_transform.add_argument("-n", "--output", default = "frozen_model.pb", type=str,
25+
help = "the model after passing parameters")
1826
parser_train = subparsers.add_parser('train', help='train a model')
1927
parser_train.add_argument('INPUT',
2028
help='the input parameter file in json format')
@@ -62,5 +70,7 @@ def main () :
6270
config(args)
6371
elif args.command == 'test' :
6472
test(args)
73+
elif args.command == 'transform' :
74+
transform(args)
6575
else :
6676
raise RuntimeError('unknown command ' + args.command)

0 commit comments

Comments
 (0)