mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2024-03-22 13:10:55 +08:00
XSeg trainer: additional dssim loss.
This commit is contained in:
parent
65432d0c3d
commit
af0b3904fc
|
@ -95,6 +95,9 @@ class XSegModel(ModelBase):
|
|||
gpu_pred_list.append(gpu_pred_t)
|
||||
|
||||
gpu_loss = tf.reduce_mean( tf.nn.sigmoid_cross_entropy_with_logits(labels=gpu_target_t, logits=gpu_pred_logits_t), axis=[1,2,3])
|
||||
gpu_loss += tf.reduce_mean ( 0.1*nn.dssim(gpu_target_t, gpu_pred_logits_t, max_val=1.0, filter_size=3), axis=[1])
|
||||
|
||||
|
||||
gpu_losses += [gpu_loss]
|
||||
|
||||
gpu_loss_gvs += [ nn.gradients ( gpu_loss, self.model.get_weights() ) ]
|
||||
|
|
Loading…
Reference in New Issue
Block a user