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
7805ca8f
Commit
7805ca8f
authored
Jul 05, 2021
by
LDOUBLEV
Browse files
fix test.sh
parent
680b1098
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test/test.sh
test/test.sh
+5
-5
No files found.
test/test.sh
View file @
7805ca8f
...
...
@@ -110,7 +110,7 @@ function func_inference(){
for
threads
in
${
cpu_threads_list
[*]
}
;
do
for
batch_size
in
${
batch_size_list
[*]
}
;
do
_save_log_path
=
"
${
_log_path
}
/infer_cpu_usemkldnn_
${
use_mkldnn
}
_threads_
${
threads
}
_batchsize_
${
batch_size
}
"
command
=
"
${
_python
}
${
_script
}
${
use_gpu_key
}
=
${
use_gpu
}
${
use_mkldnn_key
}
=
${
use_mkldnn
}
${
cpu_threads_key
}
=
${
threads
}
${
model_dir_key
}
=
${
_model_dir
}
${
batch_size_key
}
=
${
batch_size
}
${
image_dir_key
}
=
${
_img_dir
}
${
save_log_key
}
=
${
_save_log_path
}
"
command
=
"
${
_python
}
${
_script
}
${
use_gpu_key
}
=
${
use_gpu
}
${
use_mkldnn_key
}
=
${
use_mkldnn
}
${
cpu_threads_key
}
=
${
threads
}
${
model_dir_key
}
=
${
_model_dir
}
${
batch_size_key
}
=
${
batch_size
}
${
image_dir_key
}
=
${
_img_dir
}
${
save_log_key
}
=
${
_save_log_path
}
--benchmark=True
"
eval
$command
status_check
$?
"
${
command
}
"
"
${
status_log
}
"
done
...
...
@@ -124,7 +124,7 @@ function func_inference(){
fi
for
batch_size
in
${
batch_size_list
[*]
}
;
do
_save_log_path
=
"
${
_log_path
}
/infer_gpu_usetrt_
${
use_trt
}
_precision_
${
precision
}
_batchsize_
${
batch_size
}
"
command
=
"
${
_python
}
${
_script
}
${
use_gpu_key
}
=
${
use_gpu
}
${
use_trt_key
}
=
${
use_trt
}
${
precision_key
}
=
${
precision
}
${
model_dir_key
}
=
${
_model_dir
}
${
batch_size_key
}
=
${
batch_size
}
${
image_dir_key
}
=
${
_img_dir
}
${
save_log_key
}
=
${
_save_log_path
}
"
command
=
"
${
_python
}
${
_script
}
${
use_gpu_key
}
=
${
use_gpu
}
${
use_trt_key
}
=
${
use_trt
}
${
precision_key
}
=
${
precision
}
${
model_dir_key
}
=
${
_model_dir
}
${
batch_size_key
}
=
${
batch_size
}
${
image_dir_key
}
=
${
_img_dir
}
${
save_log_key
}
=
${
_save_log_path
}
--benchmark=True
"
eval
$command
status_check
$?
"
${
command
}
"
"
${
status_log
}
"
done
...
...
@@ -138,9 +138,9 @@ if [ ${MODE} != "infer" ]; then
IFS
=
"|"
for
gpu
in
${
gpu_list
[*]
}
;
do
use_gpu
=
True
train_
use_gpu
=
True
if
[
${
gpu
}
=
"-1"
]
;
then
use_gpu
=
False
train_
use_gpu
=
False
env
=
""
elif
[
${#
gpu
}
-le
1
]
;
then
env
=
"export CUDA_VISIBLE_DEVICES=
${
gpu
}
"
...
...
@@ -181,7 +181,7 @@ for gpu in ${gpu_list[*]}; do
save_log
=
"
${
LOG_PATH
}
/
${
trainer
}
_gpus_
${
gpu
}
_autocast_
${
autocast
}
"
if
[
${#
gpu
}
-le
2
]
;
then
# epoch_num #TODO
cmd
=
"
${
python
}
${
run_train
}
${
train_use_gpu_key
}
=
${
use_gpu
}
${
autocast_key
}
=
${
autocast
}
${
epoch_key
}
=
${
epoch_num
}
${
save_model_key
}
=
${
save_log
}
"
cmd
=
"
${
python
}
${
run_train
}
${
train_use_gpu_key
}
=
${
train_
use_gpu
}
${
autocast_key
}
=
${
autocast
}
${
epoch_key
}
=
${
epoch_num
}
${
save_model_key
}
=
${
save_log
}
"
elif
[
${#
gpu
}
-le
15
]
;
then
cmd
=
"
${
python
}
-m paddle.distributed.launch --gpus=
${
gpu
}
${
run_train
}
${
autocast_key
}
=
${
autocast
}
${
epoch_key
}
=
${
epoch_num
}
${
save_model_key
}
=
${
save_log
}
"
else
...
...
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