yamle.losses.regression module#
- class yamle.losses.regression.GaussianNegativeLogLikelihoodLoss(flatten=False, *args, **kwargs)[source]#
Bases:
BaseLossThis defines the base negative log-likelihood loss.
It assumes that the input shape is (batch_size, num_members, 1) of only mean is predicted or (batch_size, num_members, 2) if mean and variance are predicted. The first feature is the mean and the second is the variance. No matter what the reduction it is always averaged over the num_members.
The loss can also be weighted by a weight tensor of shape (batch_size).
- Parameters:
flatten¶ (bool) – Whether to flatten the input. Defaults to False.
- tasks = ['regression', 'depth_estimation', 'reconstruction']#
- class yamle.losses.regression.MeanSquaredError(flatten=False, *args, **kwargs)[source]#
Bases:
BaseLossThis defines the mean squared error loss.
It assumes that the input shape is (batch_size, num_members, 1). If there are more features, only the first feature is used. No matter what the reduction it is always averaged over the num_members.
The loss can also be weighted by a weight tensor of shape (batch_size).
- Parameters:
flatten¶ (bool) – Whether to flatten the input. Defaults to False.
- tasks = ['regression', 'depth_estimation', 'reconstruction']#
- class yamle.losses.regression.QuantileRegressionLoss(quantiles=[0.1, 0.5, 0.9], **kwargs)[source]#
Bases:
BaseLossThis defines the quantile regression loss.
It assumes that the input shape is (batch_size, num_members, quantiles) The losses for different quantiles are averaged.
The loss can also be weighted by a weight tensor of shape (batch_size).
- Parameters:
quantiles¶ (List[float]) – The quantiles to be used for computing the loss.
- tasks = ['regression', 'depth_estimation', 'reconstruction']#