Skip to content

How to use Multi-Code method for StyleGAN? #3

Description

@zhufeida

Hi, in derivable_generator.py, several configurations are listed. However, there is no multi-code configuration for StyleGAN. In fact, StyleGAN's design is different from pggan, where w is inserted into each middle layers of the generator by AdaIN. How to use multi-code scheme in StyleGAN scenario?

def get_derivable_generator(gan_model_name, generator_type, args):
    if generator_type == 'PGGAN-z':  # Single latent code
        return PGGAN(gan_model_name)
    elif generator_type == 'StyleGAN-z':
        return StyleGAN(gan_model_name, 'z')
    elif generator_type == 'StyleGAN-w':
        return StyleGAN(gan_model_name, 'w')
    elif generator_type == 'StyleGAN-w+':
        return StyleGAN(gan_model_name, 'w+')
    elif generator_type == 'PGGAN-Multi-Z':  # Multiple Latent Codes
        return PGGAN_multi_z(gan_model_name, args.composing_layer, args.z_number, args)
    else:
        raise Exception('Please indicate valid `generator_type`')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions