Skip to content

LossHub: Loss Functions Library for Image Classification and Detection

License

Notifications You must be signed in to change notification settings

kadirnar/losshub

Repository files navigation

LossHub: Loss Functions Library for Image Classification and Detection

pypi version hugging face spaces medium

Loss Functions for Image Classification

Rmse: It is a frequently used measure of the differences between values (sample or population values) predicted by a model or an estimator and the values observed.

$$\text{rmse}(x,y) = \sqrt{\frac{1}{n}\sum_{i=1}^n (x_i - y_i)^2}$$

Mse: In statistics, the mean squared error or mean squared deviation of an estimator (of a procedure for estimating an unobserved quantity) measures the average of the squares of the errors—that is, the average squared difference between the estimated values and the actual value.

$$\text{mse}(x,y) = \frac{1}{n} \sum_{i=1}^n (x_i - y_i)^2$$

Installation

pip install losshub

Usage

from losshub.losses import mse, rmse
# outputs and labels
y_true = [1, 2, 3, 4, 5]
y_pred = [1, 2, 3, 4, 5]
# mse
mse(y_true, y_pred)
# rmse
rmse(y_true, y_pred)

References

About

LossHub: Loss Functions Library for Image Classification and Detection

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages