Lesson 2 discussion

When you switch from using get_data() to get_batches() you’ll have to change the rest of the code to use batches instead of a numpy array. So, as you found, you can’t use .shape. But you should be able to avoid .shape, since with batches you can simply call fit_generator. See https://github.com/fchollet/keras/issues/1627 for a discussion of this method, if you’re having trouble with it, or search our github repo for ‘fit_generator’ to see lots of examples of its use in our notebooks.