if not nearly_eq_tol(
                        gold_output[r], predicted_output[r], 1e-6
                    ):
                        num_mistakes += 1