Error in statefarm-sample.ipynb

Hi, when run the statefarm-sample.ipynb, I got following error:

np.round(model.predict_generator(batches, batches.N)[:10],2)

AttributeError Traceback (most recent call last)
in ()
----> 1 np.round(model.predict_generator(batches, batches.N)[:10],2)

AttributeError: ‘DirectoryIterator’ object has no attribute ‘N’
see my attachment:

You can .__dict__ any object in python (AFAIK) this shows its variables and methods. "batches.__dict__"
I can see lowercase ‘n’ in my ImageDataGenerator "‘n’: 19507,"
Maybe you can use this lowercase ‘n’ instead of upper case.
From keras documentation we can see that second argument of predict_generator is ‘steps’.
"Total number of steps (batches of samples) to yield from generator before stopping"
https://keras.io/models/sequential/#predict_generator
So this would be correct if your batch size is 1.
I think you have to divide this with your batch size to get correct shape of your output.
Keras code changes a lot, I could not find good documentation of previous versions.

@neuralMax, thanks for your guidance, yes, from my side, it is also lowercase n.