keras-team / keras-core

A multi-backend implementation of the Keras API, with support for TensorFlow, JAX, and PyTorch.
Apache License 2.0
1.27k stars 115 forks source link

added erf op to math.py #908

Closed sqali closed 10 months ago

sqali commented 10 months ago

Hi @fchollet ,

Hope you are doing well. As discussed in issue keras-team/keras#18442, I have raised this PR to work on the ERF function. Kindly review the changes I have currently made. Once approved, I will go ahead with the implementation for JAX, torch, and numpy backends.

Thanks & Regards

sqali commented 10 months ago

Hi @fchollet ,

Thanks so much for the guidance. The Tests are failing because the errors are greater than the tolerance level (1×10^-5) set as you can see below.

Metric Value
Max absolute difference 0.12837633
Max relative difference 0.12837917

Kindly guide me on how to resolve this issue.

Thanks & Regards

fchollet commented 10 months ago

You can just lower the precision of this particular check to 1e-4.

sqali commented 10 months ago

Hi @fchollet ,

Thanks for the reply, Lowered the precision to 1e-4 such that it would resolve the issue but the maximum difference is around 0.12 which is way higher than 0.0001 which still leads to failing tests. Kindly advise.

fchollet commented 10 months ago

Keras Core is becoming Keras 3, and we're switching development to the main repository! Please reopen this PR in the keras-team/keras repository. Unfortunately we aren't able to automatically transfer PRs (but we have transferred all issues).