Skip to content
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

[BUG] TensorFlow version of the backprop tutorial is producing incorrect benchmarks #256

Open
josh146 opened this issue Apr 20, 2021 · 3 comments · Fixed by #258
Open

[BUG] TensorFlow version of the backprop tutorial is producing incorrect benchmarks #256

josh146 opened this issue Apr 20, 2021 · 3 comments · Fixed by #258

Comments

@josh146
Copy link
Member

josh146 commented Apr 20, 2021

The time scaling plot in the backprop tutorial is currently incorrect:

image

Strangely enough, the first section of the demo, comparing single forwards and backwards pass times for parameter-shift vs. backprop, seems to still be returning sensible times.

@josh146
Copy link
Member Author

josh146 commented Apr 21, 2021

Update: this looks to be a TensorFlow specific issue, see PennyLaneAI/pennylane#1244. Swapping this demo over to Autograd reverts to the previous timing behaviour.

@josh146
Copy link
Member Author

josh146 commented Apr 23, 2021

More info:

The last build in which this demo was correctly passing occurred 8 days ago with build 2968, with demo artifact available here.

For longevity, this build had the following output:

Forward pass (best of 3): 0.005797430699749384 sec per loop
Gradient computation (best of 3): 2.5100458409004203 sec per loop
>>> print(2 * forward_time * params.size)
2.0870750519097783

image
image

@josh146 josh146 reopened this Apr 23, 2021
@josh146 josh146 changed the title [BUG] Backprop tutorial is producing incorrect benchmarks [BUG] TensorFlow version of the backprop tutorial is producing incorrect benchmarks Apr 23, 2021
@josh146
Copy link
Member Author

josh146 commented Apr 23, 2021

Update: the demo has been swapped to use autograd, while we investigate this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant