444147 (1) [Avatar] Offline
#1
Page 153, Listing 5.31, line 2:
train_datagen = ImageDataGenerator(
        rotation_range=40,
        ......
        ......
        fill_mode='nearest')


Should add parameter
rescale=1./255

Current code produces bad results (accuracy=0.5).
mythicalprogrammer (17) [Avatar] Offline
#2
I've tried your suggested fix.

It got even worst accuracy.

The book and your fix in general did not have 90% accuracy as stated in the book it hover around 50%.
svenproppert (5) [Avatar] Offline
#3
I wondered why the generators sometimes contain a "rescale" or a "fill_mode" parameter and sometimes not. Is there a pattern to it? If yes: could you please outline it in the final book? Thanks.