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 (num_classes missing) #10

Open
Michaelsqj opened this issue Dec 26, 2022 · 1 comment
Open

conditional generation (num_classes missing) #10

Michaelsqj opened this issue Dec 26, 2022 · 1 comment

Comments

@Michaelsqj
Copy link

Hi! I'm trying to use class conditional generation on stylegan2-ADA, but couldn't find the num_classes option for the vision aided discriminator

def __init__(self, cv_type, output_type='conv_multi_level', diffaug=False, device='cpu'):

@nupurkmr9
Copy link
Owner

Hi,

For vision-aided discriminators with num_classes option, please use the following class

def __init__(self, cv_type, output_type='conv_multi_level', loss_type=None, diffaug=True, device='cpu', create_optim=False, num_classes=0, activation=nn.LeakyReLU(0.2, inplace=True), **kwargs):

This has similar functionality as the one in vision-aided-gan/stylegan2/vision_module/cv_discriminator.py for unconditional models but also provides the option to add class conditioning.

Either add vision_aided_loss to the path or pip install git+https://github.com/nupurkmr9/vision-aided-gan.git. An example use is:

c.cvD_kwargs = dnnlib.EasyDict(class_name='vision_aided_loss.Discriminator', cv_type= cv, output_type=output, diffaug=True)

Thanks.

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