How to?

3.4.softmax

Aug 6, 2024
notesjulyfun技术学习d2l
1 Minutes
79 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

回归与分类

回归用于预测多少(房价),而 softmax 用于预测分类。

softmax 函数

softmax 将上一层输出取指数后求和,输出为占和的比重。

框架实现时,softmax 层无需包含于 Sequential 容器中,而是在 loss 中实现。Loss 含有 backward 代码,例如:

https://github.com/julyfun/numpytorch/blob/main/numpytorch/nn/modules/module.py

Article title:3.4.softmax
Article author:Julyfun
Release time:Aug 6, 2024
Copyright 2026
Sitemap