resnet trials
This commit is contained in:
+3
-1
@@ -1,7 +1,9 @@
|
||||
nohup python cvae.py --name="lhunor_weights_test_6" > nohup/iccv/weights_test_6.out 2>&1 &
|
||||
nohup python evaluate_ae.py --name iccv_weights_test_6 > nohup/iccv/evaluate_iccv_weights_test_6.out 2>&1 &
|
||||
nohup python calculate_error.py --name iccv_weights_test_6 > nohup/iccv/error_iccv_weights_test_6.out 2>&1 &
|
||||
nohup python auto_encoder_static.py --name="lhunor_ae_static_iccv_resnet_1" > nohup/iccv/encoders/ae_static_iccv_resnet_1.out 2>&1 &
|
||||
nohup python auto_encoder_static.py --name="lhunor_ae_static_iccv_resnet_2" > nohup/iccv/encoders/ae_static_iccv_resnet_2.out 2>&1 &
|
||||
nohup python auto_encoder_curv.py --name="lhunor_ae_curv_iccv_resnet_2" > nohup/iccv/encoders/ae_curv_iccv_resnet_2.out 2>&1 &
|
||||
nohup python auto_encoder_body.py --name="lhunor_ae_body_iccv_resnet_2" > nohup/iccv/encoders/ae_body_iccv_resnet_2.out 2>&1 &
|
||||
|
||||
|
||||
one final convolutional layer for smoothing, on the final coordinates
|
||||
|
||||
@@ -66,7 +66,7 @@ def train_step(batch):
|
||||
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 1, batch['uv_body_posed' + resolution_modifier] + 1, max_val=3, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
||||
ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_body_posed' + resolution_modifier] + 1, max_val=3))
|
||||
|
||||
loss = 1e3 * (1 - ms_ssim)
|
||||
loss = l1_loss
|
||||
|
||||
metric = tf.reduce_mean(tf.math.sqrt(tf.reduce_sum((mesh_orig - mesh_pred) ** 2, axis=-1)))
|
||||
gradients = tape.gradient(loss, model.trainable_variables)
|
||||
@@ -87,7 +87,7 @@ def valid_step(batch):
|
||||
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 1, batch['uv_body_posed' + resolution_modifier] + 1, max_val=3, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
||||
ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_body_posed' + resolution_modifier] + 1, max_val=3))
|
||||
|
||||
loss = 1e3 * (1 - ms_ssim)
|
||||
loss = l1_loss
|
||||
|
||||
metric = tf.reduce_mean(tf.math.sqrt(tf.reduce_sum((mesh_orig - mesh_pred) ** 2, axis=-1)))
|
||||
return { 'valid/loss': loss, 'valid/edge_loss': e_loss, 'valid/l1_loss': l1_loss, 'valid/euclid_error': metric, 'valid/ms_ssim': ms_ssim, }
|
||||
|
||||
@@ -70,8 +70,8 @@ def train_step(batch):
|
||||
l1_loss = tf.reduce_mean(tf.reduce_sum((tf.math.abs(batch['uv_static'] - pred)), axis=1))
|
||||
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 1, batch['uv_static'] + 1, max_val=3, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
||||
ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_static'] + 1, max_val=3))
|
||||
loss = 1e3 * (1 - ms_ssim)
|
||||
# loss = l1_loss
|
||||
# loss = 1e3 * (1 - ms_ssim)
|
||||
loss = l1_loss
|
||||
|
||||
metric = tf.reduce_sum(tf.math.sqrt(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (mesh_orig - mesh_pred) ** 2, axis=-1))) / tf.reduce_sum(batch['mesh_mask'])
|
||||
gradients = tape.gradient(loss, model.trainable_variables)
|
||||
@@ -92,8 +92,8 @@ def valid_step(batch):
|
||||
l1_loss = tf.reduce_mean(tf.reduce_sum((tf.math.abs(batch['uv_static'] - pred)), axis=1))
|
||||
# ms_ssim = tf.reduce_mean(tf.image.ssim_multiscale(pred + 1, batch['uv_static'] + 1, max_val=3, power_factors=(0.5, 0.2, 0.1, 0.1, 0.1)))
|
||||
ms_ssim = tf.reduce_mean(tf.image.ssim(pred + 1, batch['uv_static'] + 1, max_val=3))
|
||||
loss = 1e3 * (1 - ms_ssim)
|
||||
# loss = l1_loss
|
||||
# loss = 1e3 * (1 - ms_ssim)
|
||||
loss = l1_loss
|
||||
|
||||
metric = tf.reduce_sum(tf.math.sqrt(tf.reduce_sum(batch['mesh_mask'][:,:,tf.newaxis] * (mesh_orig - mesh_pred) ** 2, axis=-1))) / tf.reduce_sum(batch['mesh_mask'])
|
||||
return { 'valid/loss': loss, 'valid/edge_loss': e_loss, 'valid/l1_loss': l1_loss, 'valid/euclid_error': metric, 'valid/ms_ssim': ms_ssim, }
|
||||
|
||||
@@ -30,7 +30,7 @@ config['cond_ae']['activation'] = 'tanh'
|
||||
|
||||
config['gpu'] = '3'
|
||||
config['lr'] = 0.0001
|
||||
config['name'] = 'body_resnet_1'
|
||||
config['name'] = 'body_resnet_3'
|
||||
config['notes'] = ''
|
||||
config['tags'] = ['iccv', 'resnet']
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ config['cond_ae']['activation'] = 'tanh'
|
||||
|
||||
config['gpu'] = '2'
|
||||
config['lr'] = 0.001
|
||||
config['name'] = 'curv_resnet_1'
|
||||
config['name'] = 'curv_resnet_3'
|
||||
config['notes'] = ''
|
||||
config['tags'] = ['iccv', 'resnet']
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ config['cond_ae']['activation'] = 'tanh'
|
||||
|
||||
config['gpu'] = '1'
|
||||
config['lr'] = 3e-4
|
||||
config['name'] = 'static_resnet_1'
|
||||
config['name'] = 'static_resnet_3'
|
||||
config['notes'] = ''
|
||||
config['tags'] = ['iccv', 'resnet', 'static']
|
||||
|
||||
|
||||
+3
-3
@@ -166,7 +166,7 @@ class AEEncoderNew(tf.keras.Model):
|
||||
def __init__(self, layer_params, features, activation='tanh'):
|
||||
super(AEEncoderNew, self).__init__()
|
||||
|
||||
self.encoder = resnet_101(layer_params, features)
|
||||
self.encoder = resnet_18(layer_params, features)
|
||||
self.act = tf.keras.layers.Activation(activation)
|
||||
|
||||
|
||||
@@ -193,9 +193,9 @@ class DecoderNew(tf.keras.Model):
|
||||
self.is_label = is_label
|
||||
|
||||
if not is_label:
|
||||
self.decoder = resnet_101(layer_params, features, reversed=True, is_cvae=is_cvae)
|
||||
self.decoder = resnet_18(layer_params, features, reversed=True, is_cvae=is_cvae)
|
||||
else:
|
||||
self.decoder = resnet_101(layer_params, features, reversed=True, labels=6, is_cvae=is_cvae)
|
||||
self.decoder = resnet_18(layer_params, features, reversed=True, labels=6, is_cvae=is_cvae)
|
||||
|
||||
|
||||
def call(self, inputs, training):
|
||||
|
||||
Reference in New Issue
Block a user