Loss : AddCont -> AddCont -> Type A loss is a parametric map whose parameter is the label
It is not a `Model` because there is no concept of initialisation
Totality: total
Visibility: public exportpairLossFunctions : {auto {conArg:885} : Num l} -> Loss y (Const l) -> Loss z (Const l) -> Loss (y >*< z) (Const l) Run two losses in parallel, add their results
Totality: total
Visibility: public exportchosenBranchLoss : {default branches labels : Vect n AddCont} -> Fractional (lc .Shp) => ((i : Fin n) -> (index i branches >*< index i labels) =%+> lc) -> Loss (Coproduct branches) lc The loss of a coproduct of choices. When the types don't match, gradient
is infinite. In our examples we don't expect this to happen; but loss type
should be refined to exclude it eventually
Totality: total
Visibility: public exportresolveLoss : (ChoiceMade distName branches >*< ChoiceMade distName branches) =%+> l -> Loss (ProbabilisticChoice distName branches) l The loss variant of `resolveByLabel`. Given a loss on resolved choices we
can produce a loss on an effectful output, where the ground-truth label
selects the effect
This means that the training loop does not need to handle any effects
anymore
Totality: total
Visibility: public exportSquaredError : {auto {conArg:1190} : Num a} -> Neg a => Loss (Const a) (Const a)- Totality: total
Visibility: public export MeanSquaredError : IsCubical n => {auto {conArg:1234} : TensorMonoid (n .cont)} -> {auto {conArg:1240} : Num a} -> Neg a => Fractional a => Cast Nat a => Loss (Const (Tensor [n] a)) (Const (Tensor [] a))- Totality: total
Visibility: public export softargmaxCrossEntropyLogits : (Simplex name n >*< Simplex name n) =%+> Const (Tensor [] Double) The payoff object is the rank-0 tensor, not `Double`
Totality: total
Visibility: public exportSoftargmaxCrossEntropyLogits : Loss (Simplex name n) (Const (Tensor [] Double))- Totality: total
Visibility: public export