for i in range(num_parts):
                if not nearly_eq_tol(gold_output[i], predicted_output[i], 1e-6):
                    num_mistakes += 1