https://github.com/kadirnar/losshub
LossHub: Loss Functions Library for Image Classification and Detection
https://github.com/kadirnar/losshub
deep-learning loss-functions object-classification
Last synced: about 2 months ago
JSON representation
LossHub: Loss Functions Library for Image Classification and Detection
- Host: GitHub
- URL: https://github.com/kadirnar/losshub
- Owner: kadirnar
- License: mit
- Created: 2022-08-20T20:09:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-09T11:48:06.000Z (over 2 years ago)
- Last Synced: 2025-04-08T11:45:54.613Z (about 2 months ago)
- Topics: deep-learning, loss-functions, object-classification
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 14
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
LossHub: Loss Functions Library for Image Classification and Detection
## 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
```bash
pip install losshub
```## Usage
```python
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
- [Balanced-Loss](https://github.com/fcakyon/balanced-loss/)
- [Rmse](https://en.wikipedia.org/wiki/Root_mean_squared_error)
- [Mse](https://en.wikipedia.org/wiki/Mean_squared_error)