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

Data-efficient GANs with Adaptive Discriminator Augmentation to keras 3.0 (Tensorflow backend only) #2035

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chunduriv
Copy link
Collaborator

This PR changes the Data-efficient GANs with Adaptive Discriminator Augmentation to keras 3.0 (Tensorflow backend only)

Please review the attached gist.

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I wonder whether it would be possible to make it backend agnostic by implementing def compute_loss instead of def train_step. Maybe not. I don't recall ever doing it with a GAN. It works quite well with VAEs and diffusion models though.

@chunduriv
Copy link
Collaborator Author

chunduriv commented Jan 28, 2025

I think, in general it should be possible to implement a GAN using compute_loss, but in this case, we are additionally using some more sophisticated techniques. For instance, there's the line self.augmenter.update(real_logits), which we would have to put in compute_loss (because this is where we will have real_logits). This should work with tensorflow and torch backends, but not with Jax, since Jax does not allow traced code to have side effects.

@fchollet
Copy link
Contributor

Ok, sounds good -- in this case, please add the generated files.

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

Successfully merging this pull request may close these issues.

3 participants