Skip to content

Commit 6f022e0

Browse files
authored
Merge branch 'PaddlePaddle:develop' into develop
2 parents 5459910 + 6b29c7c commit 6f022e0

13 files changed

+96
-60
lines changed

paddlevideo/tasks/train.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ def evaluate(best):
261261
rank = dist.get_rank()
262262
#single_gpu_test and multi_gpu_test
263263
for i, data in enumerate(valid_loader):
264+
"""Next two line of code only used in test_tipc,
265+
ignore it most of the time"""
266+
if max_iters is not None and i >= max_iters:
267+
break
264268
outputs = model(data, mode='valid')
265269

266270
if cfg.MODEL.framework == "FastRCNN":

test_tipc/configs/AGCN/AGCN_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:null
1010
null:null
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/agcn/agcn_fsd.yaml -o DATASET.train.file_path="data/fsd10/FSD_train_data.npy" -o DATASET.train.label_path="data/fsd10/FSD_train_label.npy" -o DATASET.test.file_path="data/fsd10/FSD_train_data.npy"
25-
-w:output/AGCN/AGCN_epoch_00001.pdparams
25+
-w:./test_tipc/output/AGCN/AGCN_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/AGCN
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/agcn/agcn_fsd.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/agcn/agcn_fsd.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,8 +44,10 @@ inference:tools/predict.py --config configs/recognition/agcn/agcn_fsd.yaml
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/AGCN/AGCN.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/fsd10/example_skeleton.npy
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/AGCN/AGCN.pdiparams
51+
--params_file:inference.pdiparams
52+
===========================infer_benchmark_params==========================
53+
random_infer_input:[{float32,[2, 350, 25, 1]}]

test_tipc/configs/AttentionLSTM/AttentionLSTM_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:64
1010
null:null
1111
train_model_name:null
@@ -21,8 +21,8 @@ null:null
2121
null:null
2222
##
2323
===========================eval_params===========================
24-
eval:main.py --test -c configs/recognition/attention_lstm/attention_lstm_youtube8m.yaml
25-
-w:output/AttentionLSTM/AttentionLSTM_best.pdparams
24+
eval:main.py --test -c configs/recognition/attention_lstm/attention_lstm_youtube8m.yaml --save_name inference
25+
-w:./test_tipc/output/AttentionLSTM/AttentionLSTM_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/AttentionLSTM
@@ -44,8 +44,10 @@ inference:tools/predict.py --config configs/recognition/attention_lstm/attention
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/AttentionLSTM/AttentionLSTM.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example.pkl
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/AttentionLSTM/AttentionLSTM.pdiparams
51+
--params_file:inference.pdiparams
52+
===========================infer_benchmark_params==========================
53+
random_infer_input:[{float32,[512, 1024]},{int32,[1]},{float32,[512, 1024]},{float32,[512, 128]},{int32,[1]},{float32,[512, 128]}]

test_tipc/configs/BMN/BMN_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:16
1010
-o MODEL.backbone.pretrained:null
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/localization/bmn.yaml
25-
-w:output/BMN/BMN_epoch_00001.pdparams
25+
-w:./test_tipc/output/BMN/BMN_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/BMN
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/localization/bmn.yaml
30+
norm_export:tools/export_model.py -c configs/localization/bmn.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,14 +44,16 @@ inference:tools/predict.py --config configs/localization/bmn.yaml
4444
--batch_size:1
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/BMN/BMN.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example_feat.list
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/BMN/BMN.pdiparams
51+
--params_file:inference.pdiparams
5252
===========================train_benchmark_params==========================
5353
batch_size:8
5454
fp_items:fp32
5555
epoch:1
5656
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
5757
flags:FLAGS_conv_workspace_size_limit=800
58+
===========================infer_benchmark_params==========================
59+
random_infer_input:[{float32,[400, 100]}]

test_tipc/configs/PP-TSM/PP-TSM_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:2
1010
-o MODEL.backbone.pretrained:'data/ResNet50_vd_ssld_v2_pretrained.pdparams'
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/pptsm/pptsm_k400_frames_uniform.yaml
25-
-w:output/ppTSM/ppTSM_best.pdparams
25+
-w:./test_tipc/output/ppTSM/ppTSM_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/ppTSM
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/pptsm/pptsm_k400_frames_uniform.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/pptsm/pptsm_k400_frames_uniform.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,8 +44,10 @@ inference:tools/predict.py --config configs/recognition/pptsm/pptsm_k400_frames_
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/ppTSM/ppTSM.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example.avi
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/ppTSM/ppTSM.pdiparams
51+
--params_file:inference.pdiparams
52+
===========================infer_benchmark_params==========================
53+
random_infer_input:[{float32,[8, 3, 224, 224]}]

test_tipc/configs/PP-TSN/PP-TSN_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:2
1010
-o MODEL.backbone.pretrained:'data/ResNet50_vd_ssld_v2_pretrained.pdparams'
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/pptsn/pptsn_k400_videos.yaml
25-
-w:output/ppTSN/ppTSN_best.pdparams
25+
-w:./test_tipc/output/ppTSN_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/ppTSN
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/pptsn/pptsn_k400_videos.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/pptsn/pptsn_k400_videos.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,8 +44,10 @@ inference:tools/predict.py --config configs/recognition/pptsn/pptsn_k400_videos.
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/ppTSN/ppTSN.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example.avi
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/ppTSN/ppTSN.pdiparams
51+
--params_file:inference.pdiparams
52+
===========================infer_benchmark_params==========================
53+
random_infer_input:[{float32,[250, 3, 224, 224]}]

test_tipc/configs/STGCN/STGCN_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:null
1010
null:null
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/stgcn/stgcn_fsd.yaml -o DATASET.train.file_path="data/fsd10/FSD_train_data.npy" -o DATASET.train.label_path="data/fsd10/FSD_train_label.npy" -o DATASET.test.file_path="data/fsd10/FSD_train_data.npy"
25-
-w:output/STGCN/STGCN_epoch_00001.pdparams
25+
-w:./test_tipc/output/STGCN/STGCN_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/STGCN
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/stgcn/stgcn_fsd.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/stgcn/stgcn_fsd.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,8 +44,10 @@ inference:tools/predict.py --config configs/recognition/stgcn/stgcn_fsd.yaml
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/STGCN/STGCN.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/fsd10/example_skeleton.npy
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/STGCN/STGCN.pdiparams
51+
--params_file:inference.pdiparams
52+
===========================infer_benchmark_params==========================
53+
random_infer_input:[{float32,[2, 350, 25, 1]}]

test_tipc/configs/SlowFast/SlowFast_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:null
1010
-o MODEL.backbone.pretrained:null
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/slowfast/slowfast.yaml
25-
-w:output/SlowFast/SlowFast_best.pdparams
25+
-w:./test_tipc/output/SlowFast/SlowFast_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/SlowFast
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/slowfast/slowfast.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/slowfast/slowfast.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,14 +44,16 @@ inference:tools/predict.py --config configs/recognition/slowfast/slowfast.yaml
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/SlowFast/SlowFast.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example.avi
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/SlowFast/SlowFast.pdiparams
51+
--params_file:inference.pdiparams
5252
===========================train_benchmark_params==========================
5353
batch_size:8
5454
fp_items:fp32
5555
epoch:1
5656
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
5757
flags:FLAGS_conv_workspace_size_limit=800
58+
===========================infer_benchmark_params==========================
59+
random_infer_input:[{float32,[3, 4, 256, 256]},{float32,[3, 32, 256, 256]}]

test_tipc/configs/TSM/TSM_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:2
1010
-o MODEL.backbone.pretrained:'data/ResNet50_pretrain.pdparams'
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/tsm/tsm_k400_frames.yaml
25-
-w:output/TSM/TSM_best.pdparams
25+
-w:./test_tipc/output/TSM/TSM_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/TSM
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/tsm/tsm_k400_frames.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/tsm/tsm_k400_frames.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,14 +44,16 @@ inference:tools/predict.py --config configs/recognition/tsm/tsm_k400_frames.yaml
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/TSM/TSM.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example.avi
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/TSM/TSM.pdiparams
51+
--params_file:inference.pdiparams
5252
===========================train_benchmark_params==========================
5353
batch_size:30
5454
fp_items:fp32|fp16
5555
epoch:1
5656
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
5757
flags:FLAGS_conv_workspace_size_limit=800
58+
===========================infer_benchmark_params==========================
59+
random_infer_input:[{float32,[8, 3, 224, 224]}]

test_tipc/configs/TSN/TSN_train_infer_python.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gpu_list:0|0,1
55
Global.use_gpu:null|null
66
Global.auto_cast:null
77
-o epochs:2
8-
null:null
8+
-o output_dir:null
99
-o DATASET.batch_size:2
1010
-o MODEL.backbone.pretrained:'data/ResNet50_pretrain.pdparams'
1111
train_model_name:null
@@ -22,12 +22,12 @@ null:null
2222
##
2323
===========================eval_params===========================
2424
eval:main.py --test -c configs/recognition/tsn/tsn_k400_frames.yaml
25-
-w:output/TSN/TSN_best.pdparams
25+
-w:./test_tipc/output/TSN/TSN_epoch_00001.pdparams
2626
##
2727
===========================infer_params===========================
2828
-o:inference/TSN
2929
-p:null
30-
norm_export:tools/export_model.py -c configs/recognition/tsn/tsn_k400_frames.yaml
30+
norm_export:tools/export_model.py -c configs/recognition/tsn/tsn_k400_frames.yaml --save_name inference
3131
quant_export:null
3232
fpgm_export:null
3333
distill_export:null
@@ -44,14 +44,16 @@ inference:tools/predict.py --config configs/recognition/tsn/tsn_k400_frames.yaml
4444
--batch_size:1|2
4545
--use_tensorrt:False|True
4646
--precision:fp32|fp16
47-
--model_file:inference/TSN/TSN.pdmodel
47+
--model_file:inference.pdmodel
4848
--input_file:./data/example.avi
4949
null:null
5050
--enable_benchmark:True
51-
--params_file:inference/TSN/TSN.pdiparams
51+
--params_file:inference.pdiparams
5252
===========================train_benchmark_params==========================
5353
batch_size:32
5454
fp_items:fp32
5555
epoch:1
5656
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
5757
flags:FLAGS_conv_workspace_size_limit=800
58+
===========================infer_benchmark_params==========================
59+
random_infer_input:[{float32,[250, 3, 224, 224]}]

0 commit comments

Comments
 (0)