  
          n_true = K.concatenate([y_true[..., i:i + 1] * mask for i in range(3)], axis=-1)
          n_pred = K.concatenate([y_pred[..., i:i + 1] * mask for i in range(3)], axis=-1)
  
          return n_true, n_pred
 
</s> remove         n_true = K.concatenate([y_true[..., i:i + 1] * mask for i in range(3)], axis=-1)
        n_pred = K.concatenate([y_pred[..., i:i + 1] * mask for i in range(3)], axis=-1)
 </s> add         m_true = y_true[..., :3] * mask
        m_pred = y_pred[..., :3] * mask </s> remove         mask = K.expand_dims(y_true[..., mask_channel], axis=-1)
 </s> add         mask = K.tile(K.expand_dims(y_true[..., mask_channel], axis=-1), (1, 1, 1, 3)) </s> remove         n_true = y_true[..., :3] * mask
        n_pred = y_pred * mask
        return n_true, n_pred
 </s> add         m_true = y_true[..., :3] * mask
        m_pred = y_pred[..., :3] * mask

        return m_true, m_pred </s> remove         mask = K.expand_dims(y_true[..., mask_channel], axis=-1)
 </s> add         mask = K.tile(K.expand_dims(y_true[..., mask_channel], axis=-1), (1, 1, 1, 3)) </s> remove         if self._config["loss_function"] in self._uses_l2_reg and self._config["l2_reg_term"] > 0:
            logger.debug("Adding L2 Regularization for Structural Loss")
            loss_wrapper.add_loss(self._loss_dict["mse"],
                                  weight=self._config["l2_reg_term"] / 100.0,
                                  mask_channel=mask_channel)
 </s> add         logger.debug("Adding loss function: %s, weight: %s", loss_function, weight)
        loss_wrapper.add_loss(loss_function,
                              weight=weight,
                              mask_channel=self._mask_channels[0])

        channel_idx = 1
        for section in ("eye_multiplier", "mouth_multiplier"):
            mask_channel = self._mask_channels[channel_idx]
            multiplier = self._config[section] * 1.
            if multiplier > 1.:
                logger.debug("Adding section loss %s: %s", section, multiplier)
                loss_wrapper.add_loss(loss_function,
                                      weight=weight * multiplier,
                                      mask_channel=mask_channel)
            channel_idx += 1
        return m_true, m_pred
  
          n_true = K.concatenate([y_true[..., i:i + 1] * mask for i in range(3)], axis=-1)
          n_pred = K.concatenate([y_pred[..., i:i + 1] * mask for i in range(3)], axis=-1)
  
        return m_true, m_pred
keep keep keep keep replace
 Training updates
  - Add multiple selected loss functions
  - Unlock loss as a model configuration
  - Phaze-A remove encoder scaling max xap 
lib/model/losses_tf.py