mae
chronax.softssharp_losses.mae
Mean absolute error: mean(|pred - target|).
mae(pred, target)
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (the calculated loss, reduced by mean).
mse
chronax.softssharp_losses.mse
Mean squared error: mean((pred - target)**2).
mse(pred, target)
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (the calculated loss, reduced by mean).
huber
chronax.softssharp_losses.huber
Huber loss with delta = 1.0. Quadratic for |r| <= 1, linear outside.
huber(pred, target)
| Parameter | Type | Default | Description |
|---|---|---|---|
pred |
jnp.ndarray |
- | (undocumented) |
target |
jnp.ndarray |
- | (undocumented) |
Returns: jnp.ndarray (the calculated loss, reduced by mean).
resolve
chronax.softssharp_losses.resolve
Return a callable loss from either a registry string or a callable.
resolve(loss)
| Parameter | Type | Default | Description |
|---|---|---|---|
loss |
str | LossFn |
- | (undocumented) |
Returns: LossFn (a callable loss function).