About dcgan.py results

chensquan: <p>Hi！ When I run the exmaple of the dcgan.py. the results is so poor.But when I set the parameter sigma=0.01, the generator image could be recognized，but the epsilon is too large to achieve the desire effect. However， when the sigma=.6, .5, .4 , the generator image is so poor. So what can I do to improve the quality of generator image and achieve a better privacy guarantee?</p>

karthikprasad: <p><a class="mention" href="/u/chensquan">@chensquan</a> , can you please share a colab with your code (not screenshots)? As I mentioned on the github issue, it is practically impossible to accurately debug without it.</p>
<p>Here’s an example of a colab (I just copy pasted the example code) With sigma=1.3 and max_norm=1.5, I am getting a somewhat decent image after about 9 epochs without running into memory issues (even with batch size 64).</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://colab.research.google.com/drive/1Mu8kpgV27t0Q9N5UnwQwZqCIp1rO8iHo?usp=sharing">
  <header class="source">
      <img src="https://ssl.gstatic.com/colaboratory-static/common/ac0e6bae38aa2b5a52a4f6e10b43c43d/img/favicon.ico" class="site-icon" width="128" height="128">

      <a href="https://colab.research.google.com/drive/1Mu8kpgV27t0Q9N5UnwQwZqCIp1rO8iHo?usp=sharing" target="_blank" rel="noopener nofollow ugc">colab.research.google.com</a>
  </header>

  <article class="onebox-body">
    <img width="260" height="260" src="https://colab.research.google.com/img/colab_favicon_256px.png" class="thumbnail onebox-avatar">

<h3><a href="https://colab.research.google.com/drive/1Mu8kpgV27t0Q9N5UnwQwZqCIp1rO8iHo?usp=sharing" target="_blank" rel="noopener nofollow ugc">Google Colaboratory</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/5/b59ab6b9be8c094fb7dfb8acd58af8bf70d78c7f.png" data-download-href="https://discuss.pytorch.org/uploads/default/b59ab6b9be8c094fb7dfb8acd58af8bf70d78c7f" title="index"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/5/b59ab6b9be8c094fb7dfb8acd58af8bf70d78c7f_2_500x500.png" alt="index" data-base62-sha1="pUxTtUB7JJoPAwr1kdLCDjD0c23" width="500" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/5/b59ab6b9be8c094fb7dfb8acd58af8bf70d78c7f_2_500x500.png, https://discuss.pytorch.org/uploads/default/original/3X/b/5/b59ab6b9be8c094fb7dfb8acd58af8bf70d78c7f.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/b/5/b59ab6b9be8c094fb7dfb8acd58af8bf70d78c7f.png 2x" data-dominant-color="4B4B4B"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">index</span><span class="informations">530×530 212 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

alexitam: <p>Hi, <a class="mention" href="/u/karthikprasad">@karthikprasad</a>! In your example, it seems that the inputs of generator are 64 different noisy tensors. However, the generated images look exactly the same.<br>
Actually, when i set sigma=0.1, generator is able to output digit “8” of different shapes. But spent privacy budget and epsilon will explode.<br>
Could you please give any advice to solve it?</p>