fixed changed reverse?

This commit is contained in:
2023-02-21 21:08:05 +00:00
parent 2100d364f9
commit ac27319860
2 changed files with 23 additions and 20 deletions
+7 -7
View File
@@ -19,9 +19,9 @@ config['only_curvatures'] = False
ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False)
assert ablation_count == 1 or ablation_count == 0 assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '4' config['gpu'] = '5'
config['name'] = 'iccv_weights_test_6' config['name'] = 'iccv_weights_test_8'
config['notes'] = 'smaller weight loss coeff, 1e-6, convolutional weight learning, continued from _5' config['notes'] = 'smaller weight loss coeff, 1e-6, convolutional weight learning, changed convnext reverse'
config['avg_garment_path'] = 'custom_data/train_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv config['avg_garment_path'] = 'custom_data/train_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv
if config['use_skinning']: if config['use_skinning']:
@@ -53,7 +53,7 @@ if config['is_cape']:
config['smpl_res'] = 3638 config['smpl_res'] = 3638
config['pretrained_model'] = 'checkpoints/post/iccv_weights_test_5' config['pretrained_model'] = ''
############### ###############
config['lr'] = 0.0001# 0.0001 config['lr'] = 0.0001# 0.0001
@@ -91,9 +91,9 @@ config['cvae']['noise_amount'] = 0.00001
config['cvae']['kernel_size'] = 7 config['cvae']['kernel_size'] = 7
config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3] config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3]
config['cvae']['encoder_dims'] = [32, 64, 128, 256, 64] config['cvae']['encoder_dims'] = [32, 64, 128, 256, 64]
config['cvae']['decoder_depths'] = config['cvae']['encoder_depths'] config['cvae']['decoder_depths'] = [3, 9, 3, 3, 3, 3]
config['cvae']['decoder_dims'] = config['cvae']['encoder_dims'] config['cvae']['decoder_dims'] = [3, 32, 128, 128, 256, 512]
config['cvae']['decoder_weights_depths'] = [3, 3, 3, 5, 3] config['cvae']['decoder_weights_depths'] = [3, 9, 3, 3, 3]
config['cvae']['decoder_weights_dims'] = [24, 32, 64, 128, 256] config['cvae']['decoder_weights_dims'] = [24, 32, 64, 128, 256]
config['cond_ae_static'] = dict() config['cond_ae_static'] = dict()
+16 -13
View File
@@ -225,26 +225,28 @@ class ConvNeXtReverse(tf.keras.Model):
drop_path_rate=0., layer_scale_init_value=1e-6, head_init_scale=1., learn_weights=False, drop_path_rate=0., layer_scale_init_value=1e-6, head_init_scale=1., learn_weights=False,
): ):
super().__init__() super().__init__()
self.upsample_layers = [] # stem and 3 intermediate downsampling conv layers self.upsample_layers = []
stem = tf.keras.Sequential([ stem = tf.keras.Sequential([
Conv2DTranspose(dims[0], kernel_size=4, strides=4, padding='same'), LayerNormalization(epsilon=1e-6),
# UpSampling2D((4, 4), interpolation='nearest'), Conv2DTranspose(dims[0], kernel_size=2, strides=2, padding='same'),
# Conv2D(dims[0], kernel_size=4, strides=1, padding='same'), ])
# Dense(dims[0]),
LayerNormalization(epsilon=1e-6)]
)
self.upsample_layers.append(stem) self.upsample_layers.append(stem)
for i in range(len(depths) - 1):
for i in range(len(depths) - 2):
downsample_layer = tf.keras.Sequential([ downsample_layer = tf.keras.Sequential([
LayerNormalization(epsilon=1e-6), LayerNormalization(epsilon=1e-6),
Conv2DTranspose(dims[i+1], kernel_size=2, strides=2, padding='same') Conv2DTranspose(dims[i+1], kernel_size=2, strides=2, padding='same'),
# UpSampling2D((2,2), interpolation='nearest'),
# Conv2D(dims[i+1], kernel_size=2, strides=1, padding='same'),
# Dense(dims[i+1]),
]) ])
self.upsample_layers.append(downsample_layer) self.upsample_layers.append(downsample_layer)
self.stages = [] # 4 feature resolution stages, each consisting of multiple residual blocks downsample_layer = tf.keras.Sequential([
Conv2DTranspose(dims[i+2], kernel_size=2, strides=2, padding='same'),
LayerNormalization(epsilon=1e-6),
])
self.upsample_layers.append(downsample_layer)
self.stages = []
dp_rates = [x for x in np.linspace(0, drop_path_rate, sum(depths))] dp_rates = [x for x in np.linspace(0, drop_path_rate, sum(depths))]
cur = 0 cur = 0
for i in range(len(depths)): for i in range(len(depths)):
@@ -257,6 +259,7 @@ class ConvNeXtReverse(tf.keras.Model):
if not learn_weights: if not learn_weights:
self.last = Dense(3, activation='tanh') self.last = Dense(3, activation='tanh')
# self.last = Activation('tanh')
else: else:
self.last = Activation('softmax') self.last = Activation('softmax')
# self.last = Dense(24, activation='softmax') # self.last = Dense(24, activation='softmax')