Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
BoxuanXu
/
FlaskDriverMXNet2SeetaNet
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 17b5ba03
authored
Aug 30, 2017
by
BoxuanXu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit exception
1 parent
075a9be7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
src/Drive_Converter.py
src/converter.py
src/Drive_Converter.py
View file @
17b5ba0
...
@@ -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
...
...
src/converter.py
View file @
17b5ba0
...
@@ -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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment