losses¶
Loss unctions specialized for images and tracking tasks.
Functions¶
- flatten
Flattends the inputs before calling the loss function.
- sigmoid
Adds a signmoid transformation to the prediction before calling the loss function.
- weighted_crossentropy
Binary crossentropy with weighted classes.
- nd_mean_squared_error
Mean square error with flattened inputs.
- nd_mean_squared_logarithmic_error
Mean square log error with flattened inputs.
- nd_poisson
Poisson error loss flattened inputs.
- nd_squared_hinge
Squared hinge error with flattened inputs.
- nd_binary_crossentropy
Binary crossentropy error with flattened inputs.
- nd_kullback_leibler_divergence
Kullback-Leibler divergence error with flattened inputs.
- nd_mean_absolute_error
Mean absolute error with flattened inputs.
- nd_mean_absolute_percentage_error
Mean absolute percentage error with flattened inputs.
Module functions¶
flatten¶
-
deeptrack.losses.flatten(func)¶ Flattens the inputs before calling the loss function.
- Parameters
func (loss function) – The loss function to wrap.
- Returns
The new loss function.
- Return type
function
sigmoid¶
-
deeptrack.losses.sigmoid(func)¶ Adds a signmoid transformation to the prediction before calling the loss function.
- Parameters
func (loss function) – The loss function to wrap.
- Returns
The new loss function.
- Return type
function
weighted_crossentropy¶
-
deeptrack.losses.weighted_crossentropy(weight=(1, 1), eps=0.0001)¶ Binary crossentropy with weighted classes.
- Parameters
weight (Tuple[float, float]) – Tuple of two numbers, indicating the weighting of the two classes – 1 and 0.
- Returns
Weighted binary crossentropy loss function
- Return type
function