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

Conditional generation during sampling in binary class case #18

Open
PradKalkar opened this issue Jun 18, 2023 · 1 comment
Open

Conditional generation during sampling in binary class case #18

PradKalkar opened this issue Jun 18, 2023 · 1 comment

Comments

@PradKalkar
Copy link

Hi. I was wondering if its possible to do conditional generation during sampling, i.e. I am currently having a binary classification task and I would like to specify how many rows with label 1 I need to generate and similarly for other label. This time, I would be providing rows belonging to both the classes while training the GAN. Is it possible to specify such a distribution during sampling so that I get desired number of positives and negatives?

@zhao-zilong
Copy link
Contributor

zhao-zilong commented Jun 21, 2023

Hi @PradKalkar in our testing code, we actually did that, but we didn't provide this in our codebase, we don't want to make our code too complicated. It should be quite easy to achieve that, just made the conditional vector by yourself instead of random sampling. Check this line:

condvec = self.cond_generator.sample(self.batch_size)

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

No branches or pull requests

2 participants