-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
reduce time of test_TrainerOnePass #3296
Conversation
@@ -12,7 +12,7 @@ | |||
|
|||
embedding = embedding_layer( | |||
input=data_layer( | |||
name="word_ids", size=65536), | |||
name="word_ids", size=8192), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我有些好奇,我们的book的demo里面都出现了8192 这个数字,这个数字有什么特别的含义吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有特别的含义。这里我直接除了8。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
距离8192最近的素数是 8191
TeamCity上的时间:下降到28s。
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
赞提速
@@ -1,6 +1,6 @@ | |||
from paddle.trainer_config_helpers import * | |||
|
|||
settings(batch_size=128, learning_method=AdaGradOptimizer(), learning_rate=1e-4) | |||
settings(batch_size=16, learning_method=AdaGradOptimizer(), learning_rate=1e-4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我一般会选择素数作为参数,因为很多时候2的幂次不如素数那么容易导致错误。距离 16 最近的素数是 17.
@@ -12,7 +12,7 @@ | |||
|
|||
embedding = embedding_layer( | |||
input=data_layer( | |||
name="word_ids", size=65536), | |||
name="word_ids", size=8192), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
距离8192最近的素数是 8191
partly fix #3259
test_TrainerOnePass
的单测分成两种:checkRemoteParameterUpdaterTest
函数,主要消耗在启动pserver的部分,对这一部分没有进行修改。下面是其中的一个具体时间。trainerOnePassTest
,通过设置稍小一点的data_size, num_pass, 时间从几十s下降到几s。