Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print time cost with more precision #3032

Merged
merged 4 commits into from
Aug 7, 2019

Conversation

chengduoZH
Copy link
Contributor

@chengduoZH chengduoZH commented Aug 6, 2019

The time precision printed in the original implementation is too low:

Epoch ID=0 Batch ID=20 D_loss=1.02923154831 G_loss=0.678269326687 Batch_time_cost: 0.01
Epoch ID=0 Batch ID=30 D_loss=1.06344628334 G_loss=0.669093608856 Batch_time_cost: 0.01
Epoch ID=0 Batch ID=40 D_loss=1.01947855949 G_loss=0.683273673058 Batch_time_cost: 0.01
Epoch ID=0 Batch ID=50 D_loss=1.02680921555 G_loss=0.685724079609 Batch_time_cost: 0.01

Now:

Epoch ID=0 Batch ID=10 D_loss=1.12677884102 G_loss=0.629787623882 Batch_time_cost: 0.0138890743256
Epoch ID=0 Batch ID=20 D_loss=1.04104971886 G_loss=0.675913572311 Batch_time_cost: 0.013415813446
Epoch ID=0 Batch ID=30 D_loss=1.03023707867 G_loss=0.682339787483 Batch_time_cost: 0.0132811069489
Epoch ID=0 Batch ID=40 D_loss=1.04513192177 G_loss=0.671743750572 Batch_time_cost: 0.0124850273132
Epoch ID=0 Batch ID=50 D_loss=1.00802874565 G_loss=0.691895723343 Batch_time_cost: 0.0120480060577
Epoch ID=0 Batch ID=60 D_loss=1.00816726685 G_loss=0.69163608551 Batch_time_cost: 0.0121359825134
Epoch ID=0 Batch ID=70 D_loss=1.00773203373 G_loss=0.691973626614 Batch_time_cost: 0.0126001834869

@chengduoZH chengduoZH merged commit 6db35e7 into PaddlePaddle:develop Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants