taki0112 / StyleGAN-Tensorflow

Simple & Intuitive Tensorflow implementation of StyleGAN (CVPR 2019 Oral)
MIT License
211 stars 60 forks source link

in style_mod function ,why style[:,0] add 1 ? #12

Open l2009312042 opened 4 years ago

l2009312042 commented 4 years ago

in file ops.py ,the function style_mod in line 372 ,

def style_mod(x, w):
    with tf.variable_scope('StyleMod'):
        units = x.shape[-1] * 2
        style = fully_connected(w, units=units, gain=1.0, lrmul=1.0)
        style = apply_bias(style, lrmul=1.0)

        style = tf.reshape(style, [-1, 2, 1, 1, x.shape[-1]])
        x = x * (style[:, 0] + 1) + style[:, 1]

my question is why style[:,0] + 1?can anybody explain why do this ? x = x * (style[:, 0] + 1) + style[:, 1] thanks !

fungtion commented 3 years ago

The same question