Hi,
I downloaded the notebook for Course 4, Week 1, programming assignment 2 (Convolutional Model Application). In order to be able to play around with the code a little bit, I copied everything from the notebook to a Python script, that I then run from the terminal. The script is in the same local folder as the notebook, so it uses the same Python modules and data that the notebook uses, and it also uses the same version of TensorFlow, and the same seed.
When I run the downloaded notebook locally, the results are very close to as they are when I run the notebook online. No surprises there. However, when I run the script locally, I notice something strange: even though I have copied the code verbatim from the notebook, I cannot replicate the results for exercise 1 (happyModel
) - they are much worse (final accuracies around 50%). I do not have this problem with the results for exercise 2 (convolutional_model
).
I am wondering if anyone can explain this to me. I must be overlooking something.
Thanks for any help!