So I noticed from the following PyTorch code 1 that the loss script 1 has no backward function.
class GeneratorLoss(nn.Module):
    def __init__(self):
        super(GeneratorLoss, self).__init__()
...

    def forward(self, out_labels, out_images, target_images):
....

And when the code is executed only the backward function are called:
generator_criterion = GeneratorLoss()
g_loss = generator_criterion(fake_out, fake_img, real_img)
g_loss.backward()

Is the backward a standard function that does forward propagation inside it? Or when will this forward function be called? Other posts related to this is welcome.