Revert "fixed changed reverse?"

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