第2章準備
2.4.3. Partial Derivatives and Gradients2.4.3 偏導関数と勾配
Thus far, we have been differentiating functions of just one variable. In deep learning, we also need to work with functions of many variables. We briefly introduce notions of the derivative that apply to such multivariate functions.
英語のヒント
ここまでは、変数が一つだけの関数を微分してきた。深層学習では、多くの変数の関数も扱う必要がある。こうした多変数関数に当てはまる導関数の概念を、簡単に紹介する。
Let be a function with variables. The partial derivative of with respect to its parameter is
英語のヒント
を個の変数をもつ関数とする。その番目のパラメータについてのの偏導関数は次のとおりである。
(2.4.6)
To calculate , we can treat as constants and calculate the derivative of with respect to . The following notational conventions for partial derivatives are all common and all mean the same thing:
英語のヒント
を計算するには、を定数として扱い、についてのの導関数を計算すればよい。偏導関数の次の記法はどれもよく使われ、すべて同じことを意味する。
(2.4.7)
We can concatenate partial derivatives of a multivariate function with respect to all its variables to obtain a vector that is called the gradient of the function. Suppose that the input of function is an -dimensional vector and the output is a scalar. The gradient of the function with respect to is a vector of partial derivatives:
英語のヒント
多変数関数のすべての変数についての偏導関数を連結すると、関数の勾配と呼ばれるベクトルが得られる。関数の入力が次元のベクトルで、出力がスカラーだとしよう。についての関数の勾配は、個の偏導関数のベクトルである。
(2.4.8)
When there is no ambiguity, is typically replaced by . The following rules come in handy for differentiating multivariate functions:
英語のヒント
あいまいさがないときは、は普通で置き換えられる。多変数関数を微分するには、次の規則が役に立つ。
- For all we have and .
英語のヒント
すべてのについて、とが成り立つ。 - For square matrices we have that and in particular .
英語のヒント
正方行列について、が成り立ち、特にである。
Similarly, for any matrix , we have .
英語のヒント
同様に、任意の行列について、が成り立つ。