In the DCGAN 1 example, we will train the D network first with the fake and real label. After that, we will train the G network, and do not update the D network. Why didn’t the DCGAN code set requires_grad = False when training the G network? This is what I think
        for param in D.parameters():
             param.requires_grad = True
        # train with real
        ...
        # train with fake  
        ...
        #-------Update G network------------
        # Do not update D network
        for param in D.parameters():
             param.requires_grad = False
        netG.zero_grad()       
        output = netD(fake)
        errG = criterion(output, label)
        errG.backward()
        optimizerG.step()