2

是否可以添加到配置(例如,SGD 块)样本权重?每个训练示例在哪里分配一个权重?

在许多情况下,一个简单的 1/N(其中 N 是训练数据集中的样本总数)就足够了,但在其他情况下,我希望网络在某些示例中添加额外的“重点”。这可以在 CNTK 中完成吗?

谢谢,

佩德罗

4

1 回答 1

2

Yes, it can be done. If your task is binary classification you can use WeightedLogistic (label, probability, weight).

Typically weight will be an Input() which you can hook up to a stream in your data (assuming you are using CNTKTextFormatReader you can just have a |weight stream).

It can also be done for tasks other than binary classification with a little more effort.

于 2016-11-09T01:13:56.223 回答