-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
simple_neural_network.py: Fewer forward propogations to speed tests #11013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
At one point I tried to decrease the number of iterations like you did, but it didn't work. 100k iterations isn't even enough for the model to converge within 1 of the true value:
Like I've been saying, this implementation is really suboptimal and should be rewritten. |
@cclauss make 1 million and the tests will pass. I tried to measure the time (not in doctest) and it was 9 - 10 times faster. performance code:
Output:
|
@cclauss I just checked 200_000, it also worked. I apologize for not checking it right away. |
Thanks, @quant12345 please keep trying to make it faster without becoming a flaky test.
|
@tianyizheng02 For the |
Now I tried 400_000 by calling the function 100 times, sometimes the tests fail. At 500_000 I tried 1000, all tests passed(that is, I also think 500_000 is close to the optimal number).
|
Nice! Could you please try |
I run tests 1000 times. It takes some time. Update: ran it 1000 times with the number 450_000 tests were successful. |
LGTM. @tianyizheng02 |
Closes #9718
Describe your change:
Checklist: