44from .freeze import freeze
55from .config import config
66from .test import test
7+ from .transform import transform
78
89def 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