Backpropagation: Derivaiton of Loss Gradient

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












In the book "Artifical Intelligence: A Modern Approach" from S. Russel there is a derivation of the gradient of the loss with respect to the weights w used for backpropagation on page 735.



I stumbled across the third row of the derivation, where $Delta_k$ is inserted.
On the left side of the equation, there is still a '2', but on the right side it is gone.



Can someone explain to me what happened to that '2'?



begineqnarray
fracpartial Loss_kpartial omega_j,k &=& -2(y_k - a_k)fracpartial a_kpartial omega_j,k = -2(y_k - a_k)fracpartial g(in_k)partial omega_j,k \
&=& -2(y_k - a_k)g'(in_k)fracpartial in_kpartial omega_j,k = -2(y_k - a_k)g'(in_k)fracpartial partial omega_j,kleft( sum _j omega_j,ka_jright) \
&=& -colorred2(y_k - a_k) g'(in_k) a_j = -a_jDelta_k
endeqnarray



where



$$
Delta_k = Err_k times g'(in_k)
$$







share|cite|improve this question





















  • Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures.
    – José Carlos Santos
    Jul 16 at 12:41










  • How is the quantity $Err_k$ defined?
    – caverac
    Jul 16 at 14:32










  • 'Errk be the kth component of the error vector y − hw': So Errk is the same as (yk - ak)
    – MJA
    Jul 16 at 15:49















up vote
1
down vote

favorite
1












In the book "Artifical Intelligence: A Modern Approach" from S. Russel there is a derivation of the gradient of the loss with respect to the weights w used for backpropagation on page 735.



I stumbled across the third row of the derivation, where $Delta_k$ is inserted.
On the left side of the equation, there is still a '2', but on the right side it is gone.



Can someone explain to me what happened to that '2'?



begineqnarray
fracpartial Loss_kpartial omega_j,k &=& -2(y_k - a_k)fracpartial a_kpartial omega_j,k = -2(y_k - a_k)fracpartial g(in_k)partial omega_j,k \
&=& -2(y_k - a_k)g'(in_k)fracpartial in_kpartial omega_j,k = -2(y_k - a_k)g'(in_k)fracpartial partial omega_j,kleft( sum _j omega_j,ka_jright) \
&=& -colorred2(y_k - a_k) g'(in_k) a_j = -a_jDelta_k
endeqnarray



where



$$
Delta_k = Err_k times g'(in_k)
$$







share|cite|improve this question





















  • Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures.
    – José Carlos Santos
    Jul 16 at 12:41










  • How is the quantity $Err_k$ defined?
    – caverac
    Jul 16 at 14:32










  • 'Errk be the kth component of the error vector y − hw': So Errk is the same as (yk - ak)
    – MJA
    Jul 16 at 15:49













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





In the book "Artifical Intelligence: A Modern Approach" from S. Russel there is a derivation of the gradient of the loss with respect to the weights w used for backpropagation on page 735.



I stumbled across the third row of the derivation, where $Delta_k$ is inserted.
On the left side of the equation, there is still a '2', but on the right side it is gone.



Can someone explain to me what happened to that '2'?



begineqnarray
fracpartial Loss_kpartial omega_j,k &=& -2(y_k - a_k)fracpartial a_kpartial omega_j,k = -2(y_k - a_k)fracpartial g(in_k)partial omega_j,k \
&=& -2(y_k - a_k)g'(in_k)fracpartial in_kpartial omega_j,k = -2(y_k - a_k)g'(in_k)fracpartial partial omega_j,kleft( sum _j omega_j,ka_jright) \
&=& -colorred2(y_k - a_k) g'(in_k) a_j = -a_jDelta_k
endeqnarray



where



$$
Delta_k = Err_k times g'(in_k)
$$







share|cite|improve this question













In the book "Artifical Intelligence: A Modern Approach" from S. Russel there is a derivation of the gradient of the loss with respect to the weights w used for backpropagation on page 735.



I stumbled across the third row of the derivation, where $Delta_k$ is inserted.
On the left side of the equation, there is still a '2', but on the right side it is gone.



Can someone explain to me what happened to that '2'?



begineqnarray
fracpartial Loss_kpartial omega_j,k &=& -2(y_k - a_k)fracpartial a_kpartial omega_j,k = -2(y_k - a_k)fracpartial g(in_k)partial omega_j,k \
&=& -2(y_k - a_k)g'(in_k)fracpartial in_kpartial omega_j,k = -2(y_k - a_k)g'(in_k)fracpartial partial omega_j,kleft( sum _j omega_j,ka_jright) \
&=& -colorred2(y_k - a_k) g'(in_k) a_j = -a_jDelta_k
endeqnarray



where



$$
Delta_k = Err_k times g'(in_k)
$$









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 16 at 14:31









caverac

11k2927




11k2927









asked Jul 16 at 12:38









MJA

62




62











  • Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures.
    – José Carlos Santos
    Jul 16 at 12:41










  • How is the quantity $Err_k$ defined?
    – caverac
    Jul 16 at 14:32










  • 'Errk be the kth component of the error vector y − hw': So Errk is the same as (yk - ak)
    – MJA
    Jul 16 at 15:49

















  • Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures.
    – José Carlos Santos
    Jul 16 at 12:41










  • How is the quantity $Err_k$ defined?
    – caverac
    Jul 16 at 14:32










  • 'Errk be the kth component of the error vector y − hw': So Errk is the same as (yk - ak)
    – MJA
    Jul 16 at 15:49
















Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures.
– José Carlos Santos
Jul 16 at 12:41




Welcome to MSE. It is in your best interest that you type your questions (using MathJax) instead of posting links to pictures.
– José Carlos Santos
Jul 16 at 12:41












How is the quantity $Err_k$ defined?
– caverac
Jul 16 at 14:32




How is the quantity $Err_k$ defined?
– caverac
Jul 16 at 14:32












'Errk be the kth component of the error vector y − hw': So Errk is the same as (yk - ak)
– MJA
Jul 16 at 15:49





'Errk be the kth component of the error vector y − hw': So Errk is the same as (yk - ak)
– MJA
Jul 16 at 15:49
















active

oldest

votes











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2853367%2fbackpropagation-derivaiton-of-loss-gradient%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2853367%2fbackpropagation-derivaiton-of-loss-gradient%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?