date: 2024-08-25
title: Softmax and Argmax
status: DONE
author:
- AllenYGY
tags:
- NOTE
- Softmax
- Argmax
- DeepLearning
publish: True
Softmax and Argmax
The argmax function returns the index of the maximum value in a given array or function. Mathematically, it can be represented as:
给定数组如下
The softmax function converts a vector of values into probabilities, such that the sum of all probabilities equals 1. The formula for softmax is:
Where:
The denominator is the sum of the exponentials of all elements in the input vector.
这种转换在多类分类问题中特别有用,其中softmax函数的输出表示不同类的预测概率。
给定数组如下