28.04.2020 Views

Sách Deep Learning cơ bản

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.5 Chain rule 63

Từ đồ thị ta thấy: dŷ i

= σ(w 0 + w 1 ∗ x (i)

1 + w 2 ∗ x (i)

2 ) = ŷ i ∗ (1 − ŷ i )

dw 0 dw 0

dŷ i

= σ(w 0 + w 1 ∗ x (i)

1 + w 2 ∗ x (i)

dw 1 dw 1

2 )

dŷ i

= σ(w 0 + w 1 ∗ x (i)

1 + w 2 ∗ x (i)

dw 2 dw 2

2 )

= x (i)

1 ∗ ŷ i ∗ (1 − ŷ i )

= x (i)

2 ∗ ŷ i ∗ (1 − ŷ i )

Do đó

dL

= dL ∗ dŷ i

= −( y i

− 1 − y i

dw 0 dŷ i dw 0 ŷ i (1 − ŷ i ) ) ∗ ŷ i ∗ (1 − ŷ i ) = −(y i ∗ (1 − ŷ i ) − (1 − y i ) ∗ ŷ i )) = ŷ i − y i

Tương tự

dL

= x (i)

1

dw ∗ (ŷ i − y i )

1

dL

= x (i)

2

dw ∗ (ŷ i − y i )

2

Đấy là trên một điểm dữ liệu, trên toàn bộ dữ liệu

dL

=

dw 0

N

i=1

(ŷ i − y i )

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!