This commit is contained in:
2022-06-16 15:28:07 +00:00
parent 871d6a31ac
commit b0b42c1bd4
2 changed files with 6 additions and 11 deletions
-5
View File
@@ -1,5 +0,0 @@
# ignore all
*
# except this file
!.gitignore
+6 -6
View File
@@ -14,9 +14,9 @@ class Mapping(tf.keras.layers.Layer):
self.gain = 1.0
self.lrmul = 0.01
# self.pose_shape_embedding = PoseShapeEmbedding()
# self.garment_embedding = GarmentEmbedding((self.w_dim * 2) - (216 + 11))
self.garment_embedding = GarmentEmbedding(self.w_dim)
self.pose_shape_embedding = PoseShapeEmbedding()
self.garment_embedding = GarmentEmbedding((self.w_dim * 2) - (216 + 11))
# self.garment_embedding = GarmentEmbedding(self.w_dim)
self.normalize = tf.keras.layers.Lambda(lambda x: x * tf.math.rsqrt(tf.reduce_mean(tf.square(x), axis=1, keepdims=True) + 1e-8))
@@ -31,10 +31,10 @@ class Mapping(tf.keras.layers.Layer):
x = latents
# embed label if any
# pose_shape_latent = self.pose_shape_embedding([conditions[0], conditions[1]])
pose_shape_latent = self.pose_shape_embedding([conditions[0], conditions[1]])
garment_latent = self.garment_embedding(conditions[2])
# x = tf.concat([x, pose_shape_latent, garment_latent], axis=1)
x = tf.concat([x, garment_latent], axis=1)
x = tf.concat([x, pose_shape_latent, garment_latent], axis=1)
# x = tf.concat([x, garment_latent], axis=1)
# normalize inputs
x = self.normalize(x)