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 6866559f
authored
Sep 04, 2017
by
BoxuanXu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
1 parent
23709c5b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
src/Drive_Converter.py
src/GProgress.py
src/config.py
src/converter.py
src/mxnet_graph.py
src/Drive_Converter.py
View file @
6866559
...
...
@@ -131,7 +131,7 @@ def get_path_from_db(modelid,seetanet_model):
#Driver converter model by params and model graph
result
=
Run_Converter
(
params_name
,
graph_name
,
seetanet_model
)
if
result
is
"true"
:
if
result
!=
True
:
return
None
,
None
#Run_Converter("model-0015.params","model-symbol.json",seetanet_model)
...
...
src/GProgress.py
View file @
6866559
...
...
@@ -32,5 +32,8 @@ def set_err_msg_var(err_msg):
def
Post_return
():
post_return
=
{
"posttype"
:
GProgress_Var
.
posttype
,
"progress"
:
GProgress_Var
.
progress
,
"pool_id"
:
GProgress_Var
.
pool_id
,
"err_msg"
:
GProgress_Var
.
err_msg
}
requests
.
post
(
post_url
,
data
=
post_return
)
print
(
post_return
)
try
:
requests
.
post
(
post_url
,
data
=
post_return
)
except
requests
.
RequestException
as
e
:
print
(
e
)
src/config.py
View file @
6866559
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'
...
...
src/converter.py
View file @
6866559
...
...
@@ -431,7 +431,7 @@ def Run_Converter(model_param,model_json,seetanet_model):
logging
.
info
(
'start to convert model parameters'
)
converter
.
convert
(
seetanet_model
)
logging
.
info
(
'convert success!!!'
)
return
t
rue
return
T
rue
except
Exception
,
e
:
return
None
#print(e)
src/mxnet_graph.py
View file @
6866559
...
...
@@ -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,9 @@ def load_graph(json_file):
set_idx
(
graph
)
logging
.
info
(
'load graph over'
)
return
graph
except
Exception
,
e
:
print
(
e
)
return
None
# if __name__ == '__main__':
...
...
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