unrolled-gans icon indicating copy to clipboard operation
unrolled-gans copied to clipboard

Is this truly unrolled GAN?

Open orenkatzir opened this issue 6 years ago • 8 comments

Hi, I know it is, relatively, old repository, however I am not sure it is truly unrolled GAN and would like to avoid any confusion for me and others. Currently G is being optimized with respect to the D_k as if D_k was not originated from k steps of gradient descent optimization.
Am I missing something? I have noticed that you have used create_graph=True in the unrolled_d_loop, but that doesn't link between D parameters, is it?

Thx

orenkatzir avatar Dec 23 '18 17:12 orenkatzir

I also have doubts about the linkage between G and D. The gradient from the updated D only seems to flow once to G by the last D, as opposed to flowing through the updates of D. I found out about this library higher by facebook, which handles the higher order gradients. I forked and adjusted the repository to use this library. https://github.com/mk-minchul/unroll_gan/blob/49f503d4bdc06453e57eec5a96f3e232fd53e170/main.py#L109 The code works, but the result is similar. Either the benefit of using unfolded gradient as opposed to using a last model gradient is not shown drastically in this example, or my usage of higher library is not applied correctly (fix/suggestion welcome).

mk-minchul avatar Mar 17 '20 14:03 mk-minchul

@mk-minchul I think https://github.com/MarisaKirisame/unroll_gan fixed it. You can see that in the yes_higher_unroll_experiment, the final_sample quality is a bit better then no_higher_unroll, and much better then no_unroll.

MarisaKirisame avatar Apr 24 '20 07:04 MarisaKirisame

thanks for letting me know. The problem in my implementation was in feeding the same random vector for all steps. Appropriate changes are made. https://github.com/mk-minchul/unroll_gan

mk-minchul avatar Apr 24 '20 08:04 mk-minchul

yeah. i am suprised you didnt try that.

MarisaKirisame avatar Apr 24 '20 09:04 MarisaKirisame

maybe you should make a PR back to here?

MarisaKirisame avatar Apr 24 '20 09:04 MarisaKirisame

Hmm. the code structure is changed too much so PR seems too heavy. If @andrewliao11 doesn't want another repo based on his code, I could make mine private.

mk-minchul avatar Apr 24 '20 09:04 mk-minchul

I see. In this case, the best course of action is probably to cite this as the original fork of your code. Since this is open source, you have the freedom to fork it as long as you cite it.

MarisaKirisame avatar Apr 24 '20 13:04 MarisaKirisame

Yes, fork is a good idea. Made the appropriate change. Thanks

mk-minchul avatar Apr 24 '20 16:04 mk-minchul