Chapter 22 code, extra information, and errata


Sample code for chapter 22

page 628:

Replaced:

              # Predict on the image
              predictions = model.predict(image_data)

              # Get prediction instead of confidence levels
              predictions = model.output_layer_activation.predictions(predictions)

With:

              # Predict on the image
              confidences = model.predict(image_data)

              # Get prediction instead of confidence levels
              predictions = model.output_layer_activation.predictions(confidences)

Replaced variable predictions with correct confidences which we are correctly using further in the chapter, it;s just this one place that was wrong