-
Notifications
You must be signed in to change notification settings - Fork 180
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
Quantum dropout demo #1003
Quantum dropout demo #1003
Conversation
Thank you for opening this pull request. You can find the built site at this link. Deployment Info:
Note: It may take several minutes for updates to this pull request to be reflected on the deployed site. |
thank you for this really nice demo contribution @fran-scala! The bot posted a link to the site preview above, but here is a direct link to the rendered demo: https://qml-build-previews.pennylane.ai/pull_request_build_preview/1003/qml/demos/tutorial_quantum_dropout/ I'll organize with the team for review on our end -- apologies, it might be a bit slow due to the christmas break! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A great demo! Thanks for working on it 😊
Here I leave you some comments.
Let me know if you have any questions
Hey @fran-scala! Just wondering if you saw the comments by @KetpuntoG :) |
Hi @josh146! I saw the comments and I'm working on solving all the issues. This month was insane. I will commit the updated version ASAP. |
No worries at all @fran-scala! Just wanted to check in :) |
typo Co-authored-by: Guillermo Alonso-Linaje <65235481+KetpuntoG@users.noreply.github.com>
typos Co-authored-by: Guillermo Alonso-Linaje <65235481+KetpuntoG@users.noreply.github.com>
Co-authored-by: Guillermo Alonso-Linaje <65235481+KetpuntoG@users.noreply.github.com>
Hi @josh146 and @KetpuntoG ! I updated the demo. The only thing left to fix is how to entirely display the plot with training and test losses. The problem is that I'm putting the legend outside the box to not cover the plots. In my notebook, there is no display problem. It happens something similar when I try to save the image (but this can be solved by passing an extra parameter to the Let me know if you have any ideas on how to solve this and if the made changes are good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! I have seen that there are some rendering issues. I think with the extra "#" I've included, it should work :) Once the deployment works, I will contact the designer and marketing to proceed with publication. If you have a small sketch of how you would like the thumbnail, it would help us 😄
Co-authored-by: Guillermo Alonso-Linaje <65235481+KetpuntoG@users.noreply.github.com>
Hey @fran-scala , just wanted to double check |
The output is now correct! But if you have any suggestions to make the plot clearer please tell me. |
I found it different than normal to see the blue curve cut in the middle. |
Yeah the point is that on the left side the blue curve goes to 0 extremely fast, and this leads to overfitting. But if we go to 10^-4 it would be difficult to see wll in the right panel. If it's not a big deal I would rather leave it like this. By the way I think there are still rendering problems in the section "The circuit". I saw the thumbnail, cool! |
Hey ! for the publication it is possible that marketing may want to include your username in the post. Could you share with me your @username from Twitter (optional)? |
Unfortunately, I do not have a Twitter account but I would be happy to be tagged on LinkedIn (www.linkedin.com/in/fran-scala) |
Great thanks! It will probably be visible on the web today but we will announce it in two weeks time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job 🚀
Fantastic! Thanks you all for the provided help and for what you do for the community!🤩 |
Hi @fran-scala ! Marketing has scheduled the post for March 28th :) |
Sounds perfect! That day is my birthday so thanks a lot for the gift!🎉 |
Hi! This demo request refers to Issue #4929 for Pennylane, about implementing dropout for Quantum Neural Networks directly in Pennylane.
Title:
Dropout for Quantum Neural Networks
Summary:
In this demo we show how to exploit the quantum version of dropout technique to avoid the problem of
overfitting in deep Quantum Neural Networks (QNNs). What follows is based on the paper
“A General Approach to Dropout in Quantum Neural Networks” by F. Scala, et al.
Relevant references:
Possible Drawbacks:
In this demo, to show the effectiveness of the technique, dropout is implemented by randomly setting some of the optimized parameters to 0 at each iteration. Actual dropout should be implemented by substituting a certain gate with the identity gate.
Related GitHub Issues:
Pennyalne Issue #4929
If you are writing a demonstration, please answer these questions to facilitate the marketing process.
We would like to implement dropout for QNNs directly in Pennylane, referring to paper [1]
This technique (hence this demo) is for all people interested in Quantum Machine Learning. Both researchers and enthusiasts may benefit by learning from this demo how to avoid overfitting when using overparametrized QNNs. We strongly believe that it will become a standard for QML just like its classical counterpart in ML.
"Quantum Neural Networks","QNN", "overfitting", "dropout", "regularization"
(more details here)