In BCE why generator wants to maximize the cost function?

isn’t it that generator is looking at -ylog(y_hat)?
and as we set y as 1 when training generator, -ylog(y_hat) becomes -log(y_hat). And if y_hat is 1(which means discriminator thought the fake image as real), -log(y_hat) has the lowest value.

Then isn’t that generator should wants to minimize cost? What am i missing here?

@Seungjun_Lee,
One important thing to remember is that this loss calculation is looking at how the discriminator is doing. The generator wants to maximize the discriminator’s cost for the fakes the generator creates, because this means the discriminator is doing a poor job of identifying the fakes the generator creates.