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
df79294c
Commit
df79294c
authored
Jul 14, 2020
by
dyning
Browse files
add parameter enable_mkldnn
parents
7f8c64df
fbdf80dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
doc/doc_ch/benchmark.md
doc/doc_ch/benchmark.md
+1
-1
tools/infer/utility.py
tools/infer/utility.py
+5
-2
No files found.
doc/doc_ch/benchmark.md
View file @
df79294c
tools/infer/utility.py
View file @
df79294c
...
@@ -64,6 +64,7 @@ def parse_args():
...
@@ -64,6 +64,7 @@ def parse_args():
type
=
str
,
type
=
str
,
default
=
"./ppocr/utils/ppocr_keys_v1.txt"
)
default
=
"./ppocr/utils/ppocr_keys_v1.txt"
)
parser
.
add_argument
(
"--use_space_char"
,
type
=
bool
,
default
=
True
)
parser
.
add_argument
(
"--use_space_char"
,
type
=
bool
,
default
=
True
)
parser
.
add_argument
(
"--enable_mkldnn"
,
type
=
bool
,
default
=
False
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
@@ -91,8 +92,10 @@ def create_predictor(args, mode):
...
@@ -91,8 +92,10 @@ def create_predictor(args, mode):
config
.
enable_use_gpu
(
args
.
gpu_mem
,
0
)
config
.
enable_use_gpu
(
args
.
gpu_mem
,
0
)
else
:
else
:
config
.
disable_gpu
()
config
.
disable_gpu
()
# config.enable_mkldnn()
config
.
set_cpu_math_library_num_threads
(
6
)
config
.
set_cpu_math_library_num_threads
(
4
)
if
args
.
enable_mkldnn
:
config
.
enable_mkldnn
()
#config.enable_memory_optim()
#config.enable_memory_optim()
config
.
disable_glog_info
()
config
.
disable_glog_info
()
...
...
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