From 4429973f44e25b6525fd31d6b8f4a1ffe7862dbf Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Fri, 21 Jan 2022 07:19:16 +0000 Subject: [PATCH] revert profile_options --- test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt | 2 +- tools/program.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt b/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt index 39b0c834..db710d91 100644 --- a/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt +++ b/test_tipc/configs/det_mv3_db_v2.0/train_benchmark.txt @@ -10,7 +10,7 @@ Train.loader.batch_size_per_card:benchmark_train=16 Global.pretrained_model:null train_model_name:latest train_infer_img_dir:null ---profiler_options:True +--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile ## trainer:norm_train norm_train:tools/train.py -c configs/det/det_mv3_db.yml -o Global.pretrained_model=./pretrain_models/MobileNetV3_large_x0_5_pretrained diff --git a/tools/program.py b/tools/program.py index 4c4ff627..743ace09 100755 --- a/tools/program.py +++ b/tools/program.py @@ -46,8 +46,8 @@ class ArgsParser(ArgumentParser): self.add_argument( '-p', '--profiler_options', - type=bool, - default=False, + type=str, + default=None, help='The option of profiler, which should be in format \"key1=value1;key2=value2;key3=value3\".' ) @@ -150,10 +150,6 @@ def train(config, print_batch_step = config['Global']['print_batch_step'] eval_batch_step = config['Global']['eval_batch_step'] profiler_options = config['profiler_options'] - if profiler_options is True: - profiler_options = "batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile" - else: - profiler_options = None global_step = 0 if 'global_step' in pre_best_model_dict: -- GitLab