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 36c2f964
authored
Sep 04, 2017
by
BoxuanXu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
1 parent
9f92a31d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletions
src/GProgress.py
src/config.py
src/converter.py
src/mxnet_graph.py
src/GProgress.py
View file @
36c2f96
...
@@ -34,5 +34,8 @@ class GProgress_Var:
...
@@ -34,5 +34,8 @@ class GProgress_Var:
def
Post_return
(
self
):
def
Post_return
(
self
):
post_return
=
{
"posttype"
:
self
.
posttype
,
"progress"
:
self
.
progress
,
"pool_id"
:
self
.
pool_id
,
"err_msg"
:
self
.
err_msg
}
post_return
=
{
"posttype"
:
self
.
posttype
,
"progress"
:
self
.
progress
,
"pool_id"
:
self
.
pool_id
,
"err_msg"
:
self
.
err_msg
}
print
(
post_return
)
print
(
post_return
)
try
:
requests
.
post
(
post_url
,
data
=
post_return
)
requests
.
post
(
post_url
,
data
=
post_return
)
except
requests
.
RequestException
as
e
:
print
(
e
)
src/config.py
View file @
36c2f96
DATA_NAME
=
'data'
DATA_NAME
=
'data
_0
'
OUTPUT_LAYER
=
''
OUTPUT_LAYER
=
''
#MODEL_PARAM = '/home/dev01/workshop/projects/MXNet2SeetaNet/model-0015.params'
#MODEL_PARAM = '/home/dev01/workshop/projects/MXNet2SeetaNet/model-0015.params'
#MODEL_JSON = '/home/dev01/workshop/projects/MXNet2SeetaNet/model-symbol.json'
#MODEL_JSON = '/home/dev01/workshop/projects/MXNet2SeetaNet/model-symbol.json'
...
...
src/converter.py
View file @
36c2f96
...
@@ -427,6 +427,8 @@ def Run_Converter(model_param,model_json,seetanet_model,GP):
...
@@ -427,6 +427,8 @@ def Run_Converter(model_param,model_json,seetanet_model,GP):
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
)
if
graph
is
None
:
return
None
converter
=
Converter
(
graph
,
arg_params
,
aux_params
)
converter
=
Converter
(
graph
,
arg_params
,
aux_params
)
logging
.
info
(
'start to convert model parameters'
)
logging
.
info
(
'start to convert model parameters'
)
converter
.
convert
(
seetanet_model
,
GP
)
converter
.
convert
(
seetanet_model
,
GP
)
...
...
src/mxnet_graph.py
View file @
36c2f96
...
@@ -214,6 +214,7 @@ def construct_graph(json_file):
...
@@ -214,6 +214,7 @@ def construct_graph(json_file):
def
load_graph
(
json_file
):
def
load_graph
(
json_file
):
try
:
logging
.
info
(
'construct graph'
)
logging
.
info
(
'construct graph'
)
graph
=
construct_graph
(
json_file
)
graph
=
construct_graph
(
json_file
)
logging
.
info
(
'remove Flatten layer'
)
logging
.
info
(
'remove Flatten layer'
)
...
@@ -226,6 +227,8 @@ def load_graph(json_file):
...
@@ -226,6 +227,8 @@ def load_graph(json_file):
set_idx
(
graph
)
set_idx
(
graph
)
logging
.
info
(
'load graph over'
)
logging
.
info
(
'load graph over'
)
return
graph
return
graph
except
Exception
,
e
:
return
None
# if __name__ == '__main__':
# 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