Natural Language Processing · 免费预览
交叉熵损失上的梯度下降
来自条件最大似然的交叉熵损失、它在逻辑回归中的简洁梯度,以及随机梯度下降的实际应用。
1. Gradient Descent on the Cross-Entropy Loss
Gradient Descent on the Cross-Entropy Loss
2. Following the gradient downhill
Following the gradient downhill
3. Training a tiny sentiment classifier
Training a tiny sentiment classifier
4. One term of the cross-entropy loss
A classifier outputs and the gold label is . Compute the cross-entropy loss and round to three decimals.
5. The logistic gradient on one weight
During training, a document has feature value , the model outputs , and the gold label is . Compute and round to three decimals.
6. One SGD step
A weight starts at , the document's feature is , the model outputs , the gold label is , and the learning rate is . After the SGD update , what is the new ? Round to three decimals.
7. Comparing gradient magnitudes
Both documents have the same feature value and gold label . Document A gets and document B gets . Which weight update has the larger magnitude, and why?
8. Convexity, learning rates, and hyperparameters
Which statement about training logistic regression with gradient descent is correct?