Programming Machine Learning:Error in Chapter 17?

Title: Name of book: description (page number)
Example: Programming Flutter - ‘pub get’ command not working (page 15)

I needed to change the L1 regularizer parameter to 0.004 rather than 0.0004 to get similar losses between the training and validation steps. Former gave me

Epoch: 29,900 loss: 0.1450 accuracy: 0.9649 - validation loss: 0.2458 accuracy: 0.9298

rather than

Epoch: 29,900 loss: 0.0363 accuracy: 0.9965 - validation loss: 0.6155 accuracy: 0.9333

Hey, arohl… thank you for the report! Which example is this? Can you tell me the page of the book (or eBook)?

p 326 on the apple ebook


Out of curiosity, I repeated the experiment with the two values of L1 you tried. Only one shot for each. I got:

L1 == 0.004: loss: 0.0768 - accuracy: 0.9895 - val_loss: 0.4406 - val_accuracy: 0.9193
L1 == 0.0004: loss: 0.0268 - accuracy: 0.9965 - val_loss: 0.5649 - val_accuracy: 0.9298

Pretty different losses in both cases. That surprised me, because I was sure that I’d made multiple experiments back when I wrote the book–and I apparently got different results back then.

I might decide to pump up the regularization values for a future edition of the book, to get more consistent losses. Thank you for reporting this, @arohl !