Running notebooks on local machine - bit exact errors

Has anyone been successful running lab exercises on local machines and getting the same numerical output? I am running on a CPU (no GPU), and can confirm that all required modules are loaded, and using the same version of python, tensorflow, keras and pandas. Some minor differences in some of the other utility modules (such as numpy 1.18.5 on the local machine instead of 1.18.4 on the Coursera server).

All labs run OK, but the graders fail because the numerical output is different in lower order bits. For example, in Course 4, Week 4, Assignment 1 (Face Recognition), Exercise 2 (Verification) - expected distance function between "bertrand and camera_1.jpg is 0.54364836, but the local machine gives 0.54055446.

So, what’s the cause of the numerical differences? Both the Coursera server and my local machine are running the models in fp32 format, but the Coursera server appears to be using a GPU. Is the GPU not bit-exact to IEEE FP format? Hard to believe that. Are there round off errors as a result of GPU execution?

Any ideas?

1 Like