:py:mod:`orcanet.lib.losses` ============================ .. py:module:: orcanet.lib.losses .. autoapi-nested-parse:: OrcaNet custom loss functions. .. !! processed by numpydoc !! Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: orcanet.lib.losses.lkl_normal_tfp orcanet.lib.losses.lkl_normal Attributes ~~~~~~~~~~ .. autoapisummary:: orcanet.lib.losses.EPS .. py:data:: EPS .. py:function:: lkl_normal_tfp(y_true, y_pred) Normal distribution using tfp. See lkl_normal. .. !! processed by numpydoc !! .. py:function:: lkl_normal(y_true, y_pred) Negative normal log-likelihood function for n regression output neurons with clipping for increased stability. For stability in the case of outliers, the loss l_i is capped at a maximum of 10 * |pred_i - true_i| for each sample. :Parameters: **y_true** : tf.Tensor Shape (bs, 2, n) or (bs, 2). y_true[:, 0] is the label of shape (bs, n) (true), and y_true[:, 1] is not used (necessary as tf 2.1 requires y_true and y_pred to have same shape). **y_pred** : tf.Tensor Shape (bs, 2, n) or (bs, 2). The output of the network. y_pred[:, 0] is mu, and y_pred[:, 1] is sigma. .. !! processed by numpydoc !!