snn.losses¶
Base¶
Regression¶
Classification¶
Divergence¶
Factory¶
- snn.losses.get(identifier)[source]¶
Return a
Lossinstance from a string, instance, or dict.- Parameters:
identifier (str, Loss, or dict) –
String key —
"mse","categorical_crossentropy", …Loss instance — returned unchanged.
Config dict —
{"name": "huber", "delta": 2.0}. Any key accepted by the loss constructor may appear;"name"(or"class") selects the class.
- Raises:
ValueError – Unknown string or dict name.