Test_gen_reasonable assertion test

That assertion is checking that the generator’s weights are changing when you use the generator loss function. So how could that not happen? Did you use any “detach” operations in your generator loss function? Note that in the discriminator loss function, we detach the generator, so that we don’t bother computing generator gradients. But it’s key to understand that the two situations are asymmetric. In the case of the generator loss, it goes through the discriminator, so we can’t do any detaches. But the discriminators loss does not actually require the gradients for the generators.

Here’s a thread from a while back that discusses this in a bit more detail.