commented out code

This commit is contained in:
jh 2021-03-12 19:13:06 -08:00
commit 023be4cf38

View file

@ -443,15 +443,15 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
elif mouth_prio: elif mouth_prio:
gpu_target_part_mask = gpu_target_srcm_mouth gpu_target_part_mask = gpu_target_srcm_mouth
if self.options['ms_ssim_loss']: # if self.options['ms_ssim_loss']:
gpu_src_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_src*gpu_target_part_mask, gpu_pred_src_src*gpu_target_part_mask, max_val=1.0)) # gpu_src_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_src*gpu_target_part_mask, gpu_pred_src_src*gpu_target_part_mask, max_val=1.0))
else: # else:
gpu_src_loss += tf.reduce_mean ( 300*tf.abs ( gpu_target_src*gpu_target_part_mask - gpu_pred_src_src*gpu_target_part_mask ), axis=[1,2,3]) gpu_src_loss += tf.reduce_mean ( 300*tf.abs ( gpu_target_src*gpu_target_part_mask - gpu_pred_src_src*gpu_target_part_mask ), axis=[1,2,3])
if self.options['ms_ssim_loss']: # if self.options['ms_ssim_loss']:
gpu_src_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_srcm, gpu_pred_src_srcm, max_val=1.0)) # gpu_src_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_srcm, gpu_pred_src_srcm, max_val=1.0))
else: # else:
gpu_src_loss += tf.reduce_mean ( 10*tf.square( gpu_target_srcm - gpu_pred_src_srcm ),axis=[1,2,3] ) gpu_src_loss += tf.reduce_mean ( 10*tf.square( gpu_target_srcm - gpu_pred_src_srcm ),axis=[1,2,3] )
face_style_power = self.options['face_style_power'] / 100.0 face_style_power = self.options['face_style_power'] / 100.0
if face_style_power != 0 and not self.pretrain: if face_style_power != 0 and not self.pretrain:
@ -481,15 +481,15 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
elif mouth_prio: elif mouth_prio:
gpu_target_part_mask = gpu_target_dstm_mouth gpu_target_part_mask = gpu_target_dstm_mouth
if self.options['ms_ssim_loss']: # if self.options['ms_ssim_loss']:
gpu_dst_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_dst*gpu_target_part_mask, gpu_pred_dst_dst*gpu_target_part_mask, max_val=1.0)) # gpu_dst_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_dst*gpu_target_part_mask, gpu_pred_dst_dst*gpu_target_part_mask, max_val=1.0))
else: # else:
gpu_dst_loss += tf.reduce_mean ( 300*tf.abs ( gpu_target_dst*gpu_target_part_mask - gpu_pred_dst_dst*gpu_target_part_mask ), axis=[1,2,3]) gpu_dst_loss += tf.reduce_mean ( 300*tf.abs ( gpu_target_dst*gpu_target_part_mask - gpu_pred_dst_dst*gpu_target_part_mask ), axis=[1,2,3])
if self.options['ms_ssim_loss']: # if self.options['ms_ssim_loss']:
gpu_dst_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_dstm, gpu_pred_dst_dstm, max_val=1.0)) # gpu_dst_loss += tf.reduce_mean ( 10*nn.MsSsim(resolution)(gpu_target_dstm, gpu_pred_dst_dstm, max_val=1.0))
else: # else:
gpu_dst_loss += tf.reduce_mean ( 10*tf.square( gpu_target_dstm - gpu_pred_dst_dstm ),axis=[1,2,3] ) gpu_dst_loss += tf.reduce_mean ( 10*tf.square( gpu_target_dstm - gpu_pred_dst_dstm ),axis=[1,2,3] )
gpu_src_losses += [gpu_src_loss] gpu_src_losses += [gpu_src_loss]
gpu_dst_losses += [gpu_dst_loss] gpu_dst_losses += [gpu_dst_loss]