devzhk / Implicit-Competitive-Regularization

Code for: Implicit Competitive Regularization in GANs
Apache License 2.0
114 stars 18 forks source link

Make code easier to run and read for an external user #4

Closed MatthieuBizien closed 4 years ago

MatthieuBizien commented 4 years ago

Hi, nice paper :) In the process of reading and executing the code, I made a few changes that you may be interested to port back. It's mostly about initializing the system on the first run, the formatting, and a .gitignore.

MatthieuBizien commented 4 years ago

Could you also add figs/ to git ignore file please?

I updated the .gitignore.

Great advice. I will approve the change in VisionData.py and wgan_gp.py. But I would rather reorganize the code in cgd_utils.py, models.py, 'optimizers.py' by my self to make it meaningful.

The only change is the de-duplication of zero-grad, that was making copy and paste into a notebook painful. Because this PR change a lot of lines (mainly indentation), I encourage you to merge it as soon as possible, because it will be really painful to update it if something else is commited 😅It's much easier to reorganize your code after the merge.

devzhk commented 4 years ago

Alright. I merged the changes.