0

I'm not using "ImageDataGenerator" because I'm using hdf5 files. I used DataGenerator class (1) to feed data to the "model.fit_generator". So how can I get the confusion matrix given that I have batches of random data? Notice that I know how get it with "model.predict" using sklearn.

(1) https://stanford.edu/~shervine/blog/keras-how-to-generate-data-on-the-fly#

cabe
  • 115
  • 2
  • 8
  • Does anyone has an ideas? – cabe Feb 25 '19 at 13:04
  • Have you tried the answer suggested in [this thread](https://stackoverflow.com/a/47439789/10111931)? – kvish Feb 25 '19 at 18:30
  • Yes, but "validation_generator.classes" tells me that the method "classes" does not exist. – cabe Feb 26 '19 at 07:01
  • sorry I passed the wrong bookmark to you! I missed the fact that you are using a Sequence here. I had saved [this answer](https://stackoverflow.com/a/49943624/10111931) from an earlier SO thread. Maybe this is more useful in your case? – kvish Feb 26 '19 at 14:51

0 Answers0