Solved by ptrblck in post #2 
              
              
                In the update step of the discriminator (line 208), the generator does not get the data, so the backward step does not calculate any gradients for it. 
In line 217 the input to the discriminator is detached as you already observed. Thus the backward call of errD_fake also does not calculate the grad…