Giter Site home page Giter Site logo

Comments (6)

rosinality avatar rosinality commented on July 30, 2024 1

It is mixing regularization in the paper. Mixing regularization makes model robust when more than 1 latent code used for generation. (style mixing.)

from style-based-gan-pytorch.

nile649 avatar nile649 commented on July 30, 2024

Thankyou

from style-based-gan-pytorch.

nile649 avatar nile649 commented on July 30, 2024

could you also explain what is inject_index and crossover do.

    if len(style) < 2:
        inject_index = [len(self.progression) + 1]

    else:
        inject_index = random.sample(list(range(step)), len(style) - 1)

    crossover = 0

    for i, (conv, to_rgb) in enumerate(zip(self.progression, self.to_rgb)):
        if mixing_range == (-1, -1):
            if crossover < len(inject_index) and i > inject_index[crossover]:
                crossover = min(crossover + 1, len(style))

            style_step = style[crossover]

from style-based-gan-pytorch.

rosinality avatar rosinality commented on July 30, 2024

To do mixing regularization, you should choice some layers (index), and use secondary latent codes after that layer. inject_index and crossover is for implement this.

from style-based-gan-pytorch.

nile649 avatar nile649 commented on July 30, 2024

style_step = style[crossover] gives learned style from latent code, rather layer where one need to mix.

I am sorry, I am very much stuck on the same line.

from style-based-gan-pytorch.

rosinality avatar rosinality commented on July 30, 2024

Yes, it works by get style codes using index of layers and inject it to that layer.

from style-based-gan-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.