В итоге я просто поместил.
noise = tf.random.normal([BATCH_SIZE, noise_dim])
generated_images = generator(noise, training=True)
real_output = discriminator(image_batch, training=True)
fake_output = discriminator(generated_images, training=True)
gen_loss = generator_loss(fake_output)
disc_loss = discriminator_loss(real_output, fake_output)
print(gen_loss)
print(disc_loss)
в for l oop внутри функции train.