Commit 17b5ba03 by BoxuanXu

edit exception

1 parent 075a9be7
Showing with 8 additions and 4 deletions
...@@ -114,7 +114,10 @@ def get_path_from_db(modelid,seetanet_model): ...@@ -114,7 +114,10 @@ def get_path_from_db(modelid,seetanet_model):
GP.Post_return() GP.Post_return()
#Driver converter model by params and model graph #Driver converter model by params and model graph
Run_Converter(params_name,graph_name,seetanet_model) result = Run_Converter(params_name,graph_name,seetanet_model)
if result is None:
return None,None
#Run_Converter("model-0015.params","model-symbol.json",seetanet_model) #Run_Converter("model-0015.params","model-symbol.json",seetanet_model)
return params_name,graph_name return params_name,graph_name
......
...@@ -415,7 +415,7 @@ def Run_Converter(model_param,model_json,seetanet_model): ...@@ -415,7 +415,7 @@ def Run_Converter(model_param,model_json,seetanet_model):
#parser.add_argument('--model_param',type=str,default = None) #parser.add_argument('--model_param',type=str,default = None)
#parser.add_argument('--model_json',type=str,default = None) #parser.add_argument('--model_json',type=str,default = None)
#args = parser.parse_args() #args = parser.parse_args()
try:
sym, arg_params, aux_params = \ sym, arg_params, aux_params = \
load_checkpoint(model_param, model_json) load_checkpoint(model_param, model_json)
graph = load_graph(model_json) graph = load_graph(model_json)
...@@ -423,5 +423,6 @@ def Run_Converter(model_param,model_json,seetanet_model): ...@@ -423,5 +423,6 @@ def Run_Converter(model_param,model_json,seetanet_model):
logging.info('start to convert model parameters') logging.info('start to convert model parameters')
converter.convert(seetanet_model) converter.convert(seetanet_model)
logging.info('convert success!!!') logging.info('convert success!!!')
return true
except Exception, e:
return None
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!