1. 程式人生 > >【讀書1】【2017】MATLAB與深度學習——多元分類(3)

【讀書1】【2017】MATLAB與深度學習——多元分類(3)

假設神經網路在給定輸入資料時產生如圖4-11所示的輸出。

Assume that the neural network produced theoutput shown in Figure 4-11 when given the input data.

在這裡插入圖片描述
圖4-11 當使用sigmoid函式時的輸出Output when using a sigmoidfunction

由於sigmoid函式只關心它自己本身的輸出,所以每個節點的輸出與其它節點無關。

As the sigmoid function concerns only itsown output, the output here will be generated.

輸出節點1以100%的概率出現在類別1中。

The first output node appears to be inClass 1 by 100 percent probability.

那麼,資料屬於第1類嗎?

Does the data belong to Class 1, then?

並不是那樣的。

Not so fast.

其它輸出節點的值也表示該資料在類別2和類別3中的概率為100%。

The other output nodes also indicate 100percent probability of being in Class 2 and Class 3.

因此,對多元分類神經網路輸出值的充分解釋需要考慮所有節點輸出的相對大小。

Therefore, adequate interpretation of theoutput from the multiclass classification neural network requires considerationof the relative magnitudes of all node outputs.

在這個例子中,該資料屬於每個類別的概率為1/3。

In this example, the actual probability ofbeing each class is 1/3.

softmax函式給出了正確的判斷。

The softmax function provides the correctvalues.

softmax函式將輸出值的總和保持為1,並且還將各輸出值限制在0 – 1之間。

The softmax function maintains the sum ofthe output values to be one and also limits the individual outputs to be withinthe values of 0-1.

由於softmax考慮了所有輸出值的相對大小,因此softmax函式是多元分類神經網路的一種合適選擇。

As it accounts for the relative magnitudesof all the outputs, the softmax function is a suitable choice for themulticlass classification neural networks.
在這裡插入圖片描述

最後,確定學習規則。

Finally, the learning rule should bedetermined.

與二元分類網路一樣,多元分類神經網路通常採用交叉熵驅動的學習規則。

The multiclass classification neuralnetwork usually employs the cross entropy-driven learning rules just like thebinary classification network does.

這是由於交叉熵函式提供的快速學習效能和簡單特性。

This is due to the high learningperformance and simplicity that the cross entropy function provides.

長話短說,多元分類神經網路的學習規則與上一節二元分類神經網路的學習規則是一致的。

Long story short, the learning rule of themulticlass classification neural network is identical to that of the binaryclassification neural network of the previous section.

雖然這兩種神經網路採用不同的啟用函式(二元分類的sigmoid和多元分類的softmax),但是學習規則的推導結果相同。

Although these two neural networks employdifferent activation functions—the sigmoid for the binary and the softmax forthe multiclass—the derivation of the learning rule leads to the same result.

嗯,對於我們來說,需要記憶的內容越少越好。

Well, it is better for us to have less toremember.

下面總結了多元分類神經網路的訓練過程。

The training process of the multiclassclassification neural network is summarized in these steps.

——本文譯自Phil Kim所著的《Matlab Deep Learning》

更多精彩文章請關注微訊號:在這裡插入圖片描述