Пример #1
0
    def loss(self, predictions, targets):
        """Compute the necessary loss for training.
    Args:
    Returns:
    """
        self.reproduction_loss = l1_loss(
            predictions, targets)  # l2_loss(predictions, targets)
        # self.prior_loss = vae_loss(self.z_mean, self.z_logvar, prior_weight = 0.0001)

        # return [self.reproduction_loss, self.prior_loss]
        return self.reproduction_loss
Пример #2
0
    def loss(self, predictions, flow_motion, flow_mask, targets, lambda_motion,
             lambda_mask):
        """Compute the necessary loss for training.
    Args:
    Returns:
    """
        # corrected regularized loss
        self.reproduction_loss = l1_loss(predictions, targets) \
                  # + lambda_motion * l1_regularizer(flow_motion) \

        # + lambda_mask * l1_regularizer(flow_mask)

        return self.reproduction_loss
Пример #3
0
 def l1loss(self, predictions, targets):
     self.reproduction_loss = l1_loss(predictions, targets)
     return self.reproduction_loss