Cat v Dogs -- High Loss (>1) on Programming Assignment

Hi!
I’ve been trying to finish the programming assignment for the first week, although I can’t find if there’s an error after reading the code multiple times and read the forum the output remains the same:

Epoch 1/2
270/270 [==============================] - 36s 131ms/step - loss: 7.6520 - acc: 0.5007 - val_loss: 7.6666 - val_acc: 0.5000
Epoch 2/2
270/270 [==============================] - 32s 119ms/step - loss: 7.6666 - acc: 0.5000 - val_loss: 7.6666 - val_acc: 0.5000

Can anyone see an error that im missing somewhere? Thanks

Also, I forgot to mention, but tried more epochs, or running multiple times with 2 epochs and the acuracy stays at 0.5 and loss never goes below 1

Use ImageDataGenerator(rescale=1/255). The 1st parameter of ImageDataGenerator is featurewise_center. Without the named parameter i.e. by using positional parameter, you’re setting the wrong parameter. Once you confirm that things work, I’ll delete your code.

1 Like

It worked, now I see why, thanks a lot for the help :raised_hands:

Also I deleted the code, thanks again for the help!