added skinning and gnn discriminator

This commit is contained in:
2022-06-25 16:00:58 +00:00
parent 0e88eb341c
commit 5e00b395ad
25 changed files with 321 additions and 45 deletions
+4 -1
View File
@@ -17,6 +17,8 @@ class Generator(tf.keras.Model):
self.featuremaps = g_params['featuremaps']
self.w_ema_decay = 0.995
self.style_mixing_prob = 0.9
self.zero_body = tf.ones((4,3,512,256)) * tf.transpose(g_params['zero_body'], [2,0,1])[tf.newaxis,:,:,:]
self.n_broadcast = len(self.resolutions) * 2
self.mixing_layer_indices = tf.range(self.n_broadcast, dtype=tf.int32)[tf.newaxis, :, tf.newaxis]
@@ -102,7 +104,8 @@ class Generator(tf.keras.Model):
w_broadcasted = self.truncation_trick(w_broadcasted, truncation_psi, truncation_cutoff)
image_out = self.synthesis(w_broadcasted)
# image_out = image_out + conditions[4]
# image_out = image_out + conditions[2]
image_out = image_out + self.zero_body[:image_out.shape[0]]
image_out = image_out * conditions[3][:,tf.newaxis,:,:]
if ret_w_broadcasted: