Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator loss in Super-resolution GAN. #102

Open
tahmid32 opened this issue Jul 19, 2021 · 0 comments
Open

Generator loss in Super-resolution GAN. #102

tahmid32 opened this issue Jul 19, 2021 · 0 comments

Comments

@tahmid32
Copy link

Hi there! Thanks for the good work. I am using Super-resolution GAN code from here for my academic project. Here in the code snippet:

        """
        Train the generator network
        """

        # Sample a batch of images
        high_resolution_images, low_resolution_images = sample_images(data_dir=data_dir, batch_size=batch_size,
                                                                      low_resolution_shape=low_resolution_shape,
                                                                      high_resolution_shape=high_resolution_shape)
        # Normalize images
        high_resolution_images = high_resolution_images / 127.5 - 1.
        low_resolution_images = low_resolution_images / 127.5 - 1.

        # Extract feature maps for real high-resolution images
        image_features = vgg.predict(high_resolution_images)

        # Train the generator network
        g_loss = adversarial_model.train_on_batch([low_resolution_images, high_resolution_images],
                                         [real_labels, image_features])

        print("g_loss:", g_loss)

When g_loss is printed, 3 losses are shown. My query is that middle one among the three losses belongs to which category. Thanks and regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant