Discriminator loss - task formulation

Hi! There is a phrase in the task formulation and it slightly confused me when I performed it.
Here is the description:

Discriminator Loss
First, you’re going to be implementing the discriminator loss. This is the same as in previous assignments, so it should be a breeze :slight_smile: Don’t forget to detach your generator!

So, initially I thought that I have to detach the generator inside the function, and I was confused because the function does not accept it as an argument:

def get_disc_loss(real_X, fake_X, disc_X, adv_criterion):
    ...

If I understood it right, this instruction refers to the usage of this function and not to the implementation in the current section, so this is just a small feedback.
Excellent course by the way, thank you very much, it’s so helpful!

Hi @gorev.pv,
So glad you’re enjoying the course!

The comment about detaching the generator is actually intended for inside this function. Remember that you apply the detach() function to the output from the generator - in this case, fake_X, which is one of the parameters passed into get_disc_loss().

For a little more detail, there’s a nice explanation about detaching the generator in this post: Why should we detach the discriminators input ?!