mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-08-21 22:13:20 -07:00
debug
This commit is contained in:
parent
cce3061dca
commit
bcffcde97f
1 changed files with 10 additions and 0 deletions
|
@ -446,6 +446,16 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
|
|||
gpu_target_part_mask = gpu_target_srcm_mouth
|
||||
|
||||
if self.options['ms_ssim_loss']:
|
||||
# FIXME
|
||||
ms_ssim_loss = nn.MsSsim(resolution, kernel_size=5)(gpu_target_src*gpu_target_part_mask, gpu_pred_src_src*gpu_target_part_mask, max_val=1.0)
|
||||
print('ms_ssim_loss.shape: ', ms_ssim_loss.shape)
|
||||
ms_ssim_mean_loss = tf.reduce_mean(300 * ms_ssim_loss)
|
||||
print('ms_ssim_mean_loss.shape: ', ms_ssim_mean_loss.shape)
|
||||
abs_loss = tf.abs ( gpu_target_src*gpu_target_part_mask - gpu_pred_src_src*gpu_target_part_mask )
|
||||
print('abs_loss.shape: ', abs_loss.shape)
|
||||
abs_mean_loss = tf.reduce_mean(300 * abs_loss, axis=[1,2,3])
|
||||
print('abs_mean_loss.shape: ', abs_mean_loss.shape)
|
||||
|
||||
gpu_src_loss += tf.reduce_mean ( 300*nn.MsSsim(resolution, kernel_size=5)(gpu_target_src*gpu_target_part_mask, gpu_pred_src_src*gpu_target_part_mask, max_val=1.0))
|
||||
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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue