-
Notifications
You must be signed in to change notification settings - Fork 348
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
Patch for DSGAN example #494
base: main
Are you sure you want to change the base?
Conversation
…g in DCGAN example
…the other for real data
Hi @Koukyosyumei! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
I have run both scripts and found that only patch_1 (clipping gradients for both fake and real data) works. I think it is reasonable that the second approach, which uses two optimizers, makes the gradients for actual data too small compared to real data due to the gradient clipping. I also tried applying |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Koukyosyumei has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Koukyosyumei Thank you very much for working on this! |
@Koukyosyumei has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Koukyosyumei has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Koukyosyumei has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@Koukyosyumei has updated the pull request. You must reimport the pull request before landing. |
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Types of changes
Motivation and Context / Related issue
I would like to solve #418. I quickly implemented two solutions suggested in the forum. Though I have created two separate py scripts for the solutions, I will experiment with the model performance of each solution and merge the better one. Since this is the first PR for opacus, any suggestions and help are welcome!
How Has This Been Tested (if it applies)
1. Loss (and accuracy)
The losses of the original implementation, solution 1, and solution 2 correspond to green, yellow, and blur lines. Due to the memory limitation, solution 2 works only batch size = 32for my environment (google colab).
2. Examples of generated images
batch size 64
batch size 32
3. Final$\epsilon$
batch size 64
Checklist