quantum icon indicating copy to clipboard operation
quantum copied to clipboard

New tutorial/example for qGAN

Open oliverob opened this issue 5 years ago • 7 comments

Closes #325

I have written a new tutorial/example jupyter notebook for implementing a qGAN using TFQ and TF-GAN. However, I have been stuck for a while trying to actually get it to work. My network doesn't seem to be learning correctly, and I am not sure how to fix it. If anyone could give me any pointers that would be brilliant. Currently, my discriminator loss is growing out of control, whilst my generator loss is shrinking. I am worried that the problem might actually be caused by a bug in the implementation that I can't find rather than something like the learning rates but I am not sure.

oliverob avatar Aug 12 '20 09:08 oliverob

Check out this pull request on  ReviewNB

Review Jupyter notebook visual diffs & provide feedback on notebooks.


Powered by ReviewNB

Thank you for this awesome contribution. First of all, I saw that tensorflow_gan is not installed. could you install? in notebook, we can get it by !pip install -U tensorflow_gan. Please let me review this notebook in a week, due to limited bandwidth. Thanks!

jaeyoo avatar Aug 12 '20 21:08 jaeyoo

I left review comments inside ReviewNB. @oliverob Please check it. For the training, could you lower your learning rate? I see you set it as 0.5 for two adam optimizers. please lower it to 0.05 or 0.01.

jaeyoo avatar Aug 22 '20 22:08 jaeyoo

Thanks for all the comments. Sorry about all the lint and comment issues. I didn't mean for this to be production code yet - I was hoping to get try and figure out why it doesn't work before making the surrounding explaination correct and understandable. I'll make your suggested changes, and add a few of my own from work I did last week. I still cannot get it to learn correctly, I think I am approaching batches wrong. I'll let you know when I commit my newest version with my confused attempt at using batches.

oliverob avatar Aug 24 '20 17:08 oliverob

@jaeyoo I have made the changes you suggested and tried to get it working but it still isn't learning correctly. Please could you have a look at the comments I have left in reviewnb and suggest anything I could try to make it work.

oliverob avatar Aug 25 '20 11:08 oliverob

@jaeyoo Any ideas?

oliverob avatar Aug 31 '20 16:08 oliverob

@jaeyoo Any ideas?

Sorry, I am on the long vacations... please let me check it later.. I apologize for the belated messages.

jaeyoo avatar Aug 31 '20 23:08 jaeyoo