The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

615591 (2) [Avatar] Offline
#1
First of all, congratulations for the book, it's really useful for someone who wants to understand how Deep learning works and not only putting one line in keras waiting the magic happens.

Quick question, on the page 122 to update the weights we do:

weights_1_2 += alpha * layer_1.T.dot(layer_2_delta)

and before that page is being used -=

I was wondering if this change has something to do with the change on our computation of the layer_2_delta which on the page 122 is computed as goal - prediction and before has been computed as pred-goal.

Thank you and good job smilie
615591 (2) [Avatar] Offline
#2
After 30 minutes of trial and error, I m auto-answering my question, since it could helpful for some. Basically the both ways are equivalents, this means if you compute the layer_2_delta as pred - goal then you will have to use -= when you update the weights and if you use goal-pred then it would be +=. Feel free to test it out and print out the error to find out are the same.
587968 (3) [Avatar] Offline
#3
Hi

My post entitled "Calculating Error and Delta Updated" concerns the same issue.

What do you think of my conclusion?

Regards
Anthony