Hi Vatsal and everyone else,

I would recommend running the whole Jupyter notebook found in the GitHub repo as it is more inclusive than the snippets that I put in the blog. The link to the GitHub repo was in the blog but I will post it here again incase you missed it: https://github.com/mikesmales/Udacity-ML-Capstone

The code snippet you are referencing here is for the CNN model which uses a modified version of the extract_features function (versus the extract_features snippet in the blog which was for a different model) . Full explanation is in this Jupyter notebook https://github.com/mikesmales/Udacity-ML-Capstone/blob/master/Notebooks/4%20Model%20Refinement.ipynb

Written by

Software engineer and business builder. Entrepreneurship, Start-ups, Deep-Tech, Mobile, IoT, & AI. Former COO at chirp.io. See mikesmales.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store