CNTK训练速度在每个时代之后放慢速度

时间:2017-03-09 21:55:43

标签: cntk

我正在尝试直接从他们的语言理解教程中训练CNTK模型。

Sequential([
            Embedding(emb_dim),
            OneWordWindow(),
            BatchNormalization(),
            BiRecurrence(LSTM(hidden_dim), LSTM(hidden_dim)),
            BatchNormalization(),
            Dense(num_labels)
        ])

似乎训练速度在每个时期之后变慢(见下文)。这是因为学习费率计划,还是我在这里遗漏了什么?

亚当的LR时间表是

 lr_per_sample = [0.003]*4+[0.0015]*24+[0.0003]
 lr_per_minibatch = [x * minibatch_size for x in lr_per_sample]
 lr_schedule = learning_rate_schedule(lr_per_minibatch, UnitType.minibatch, epoch_size)



Finished Epoch[1 of 1000]: [Training] loss = 0.149485 * 18059, metric = 3.46% * 18059 10.189s (1772.3 samples per second);

Finished Epoch[2 of 1000]: [Training] loss = 0.071990 * 17974, metric = 1.47% * 17974 51.836s (346.7 samples per second);

Finished Epoch[3 of 1000]: [Training] loss = 0.106882 * 17992, metric = 2.08% * 17992 60.175s (299.0 samples per second);

Finished Epoch[4 of 1000]: [Training] loss = 0.074046 * 17987, metric = 1.51% * 17987 68.655s (262.0 samples per second);

Finished Epoch[5 of 1000]: [Training] loss = 0.052539 * 17995, metric = 1.28% * 17995 77.627s (231.8 samples per second);

Finished Epoch[6 of 1000]: [Training] loss = 0.057482 * 18011, metric = 1.55% * 18011 86.191s (209.0 samples per second);

1 个答案:

答案 0 :(得分:1)

在ProgreessPrinter中发现了一个错误,它会影响每秒样本数的打印输出。实际速度不受影响,只是报告速度。这个错误在master中得到修复 - 所以你现在可以得到这个,或者你可以等到下一个正式发布,定于2017年3月14日。