diff --git a/tools/program.py b/tools/program.py index 71e9200e30692f319b26573a7471771a7effc44b..4545ba9b7d112ca59ce77a9f7101ebd4e96f8d46 100644 --- a/tools/program.py +++ b/tools/program.py @@ -437,19 +437,9 @@ def run(dataloader, batch_time = AverageMeter('elapse', '.3f') tic = time.time() dataloader = dataloader if config.get('use_dali') else dataloader()() - #sta = 0 for idx, batch in enumerate(dataloader): - #start_time = time.time() metrics = exe.run(program=program, feed=batch, fetch_list=fetch_list) - #end_time = time.time() - #statistics = end_time - start_time - # if idx >= 10: - # sta = sta+statistics - # if idx == 110 and int(os.getenv("PADDLE_TRAINER_ID", 0)) == 0: - # print("10-100batch speed 000", sta/100, 's/batch', 'bs', config.TRAIN.batch_size) - # if idx == 110 and int(os.getenv("PADDLE_TRAINER_ID", 0)) == 1: - # print("10-100batch speed 111", sta/100, 's/batch', 'bs', config.TRAIN.batch_size) batch_time.update(time.time() - tic) tic = time.time() for i, m in enumerate(metrics): diff --git a/tools/run_dali.sh b/tools/run_dali.sh index af80560544bda6e72630519fb44f432a96e7dc4a..868a48a486140c3830798e2e109db7f174615836 100755 --- a/tools/run_dali.sh +++ b/tools/run_dali.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export PYTHONPATH=$PWD:$PYTHONPA +export PYTHONPATH=$PWD:$PYTHONPATH export FLAGS_fraction_of_gpu_memory_to_use=0.8 @@ -8,6 +8,5 @@ python3 -m paddle.distributed.launch \ --selected_gpus="0,1" \ tools/train.py \ -c ./configs/high_performance/dali.yaml \ - -o TRAIN.batch_size=4 \ -o use_mix=True \ -o use_dali=True