nupurkmr9/vision-aided-gan

conditional generation (num_classes missing)

Opened this issue · 1 comments

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'):

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.