Commit 36c2f964 by BoxuanXu

fix bug

1 parent 9f92a31d
......@@ -34,5 +34,8 @@ class GProgress_Var:
def Post_return(self):
post_return = { "posttype": self.posttype, "progress" : self.progress, "pool_id": self.pool_id, "err_msg": self.err_msg }
print(post_return)
try:
requests.post(post_url, data=post_return)
except requests.RequestException as e:
print(e)
DATA_NAME = 'data'
DATA_NAME = 'data_0'
OUTPUT_LAYER = ''
#MODEL_PARAM = '/home/dev01/workshop/projects/MXNet2SeetaNet/model-0015.params'
#MODEL_JSON = '/home/dev01/workshop/projects/MXNet2SeetaNet/model-symbol.json'
......
......@@ -427,6 +427,8 @@ def Run_Converter(model_param,model_json,seetanet_model,GP):
sym, arg_params, aux_params = \
load_checkpoint(model_param, model_json)
graph = load_graph(model_json)
if graph is None:
return None
converter = Converter(graph, arg_params, aux_params)
logging.info('start to convert model parameters')
converter.convert(seetanet_model,GP)
......
......@@ -214,6 +214,7 @@ def construct_graph(json_file):
def load_graph(json_file):
try:
logging.info('construct graph')
graph = construct_graph(json_file)
logging.info('remove Flatten layer')
......@@ -226,6 +227,8 @@ def load_graph(json_file):
set_idx(graph)
logging.info('load graph over')
return graph
except Exception, e:
return None
# if __name__ == '__main__':
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!