Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
e19bedf5
Commit
e19bedf5
authored
Apr 09, 2021
by
littletomatodonkey
Browse files
fix infer
parent
86f4abf7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
tools/infer/predict_system_mp.py
tools/infer/predict_system_mp.py
+4
-2
tools/infer/utility.py
tools/infer/utility.py
+0
-1
No files found.
tools/infer/predict_system_mp.py
View file @
e19bedf5
...
...
@@ -38,9 +38,11 @@ if __name__ == "__main__":
with
open
(
"{}/results.{}"
.
format
(
inference_dir
,
process_id
),
"w"
)
as
fin
:
p
=
subprocess
.
Popen
(
cmd
,
stdout
=
fin
,
stderr
=
fin
)
#
p = subprocess.Popen(cmd, stdout=fin, stderr=fin)
# if you want to print results in the screen, you can use the following command
#
p = subprocess.Popen(cmd, stdout=
fin
, stderr=sys.stdout)
p
=
subprocess
.
Popen
(
cmd
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stdout
)
p_list
.
append
(
p
)
for
p
in
p_list
:
p
.
wait
()
print
(
"all inference results are save in directory: {}"
.
format
(
inference_dir
))
tools/infer/utility.py
View file @
e19bedf5
...
...
@@ -85,7 +85,6 @@ def parse_args():
parser
.
add_argument
(
"--enable_mkldnn"
,
type
=
str2bool
,
default
=
False
)
parser
.
add_argument
(
"--use_pdserving"
,
type
=
str2bool
,
default
=
False
)
parser
.
add_argument
(
"--use_multiprocess"
,
type
=
str2bool
,
default
=
False
)
parser
.
add_argument
(
"--total_process_num"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--process_id"
,
type
=
int
,
default
=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment