change duration compute methods#49
change duration compute methods#49dzhwinter merged 8 commits intodzhwinter:masterfrom ccmeteorljh:master
Conversation
fluid/resnet50.py
Outdated
|
|
||
| duration = time.time() - start_time | ||
| im_num = im_num - args.skip_batch_num * args.batch_size | ||
| #im_num = im_num - args.skip_batch_num * args.batch_size |
There was a problem hiding this comment.
please delete the codes commented
| iter += 1 | ||
| continue | ||
| if pass_id == 0: | ||
| start_time = time.time() |
There was a problem hiding this comment.
For all batches in pass 0, this line will be executed. Is this what you want?
fluid/resnet50.py
Outdated
| accuracy.reset(exe) | ||
| if iter == args.iterations: | ||
| break | ||
| iter = 0 |
There was a problem hiding this comment.
Is this modification right? What's the use of args.iterations ?
There was a problem hiding this comment.
I think it shoud be:
accuracy.reset(exe)
iter = 0
the args.iterations is used to limit the iterations in each pass, so it used in:
for batch_id, data in enumerate(train_reader()):
fluid/resnet50.py
Outdated
There was a problem hiding this comment.
I remember CUDAPlace is used in the latest PaddlePaddle. Could you refer to the source codes to confirm this.
There was a problem hiding this comment.
https://github.com/ccmteorljh/benchmark/blob/6e9b36b2cd318f308b80c984617f79f6eccdce5e/fluid/resnet50.py#L170 Maybe moving L170 before L213 is better.
1,、修改了duration的计算方法,原来的是统计了最后一个pass的时间,但是计算examples_per_sec时im_num缺失所有pass的图片总和,现在修改duration为所有pass的时间总和;
2、skip_batch_num这个参数没有起到作用,现在修改了