Idris2Doc : NN.Architectures.LossFunctions

NN.Architectures.LossFunctions

(source)

Definitions

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 export
pairLossFunctions : {auto{conArg:885} : Numl} ->Lossy (Constl) ->Lossz (Constl) ->Loss (y>*<z) (Constl)
  Run two losses in parallel, add their results

Totality: total
Visibility: public export
chosenBranchLoss : {defaultbrancheslabels : VectnAddCont} ->Fractional (lc.Shp) => ((i : Finn) -> (indexibranches>*<indexilabels) =%+>lc) ->Loss (Coproductbranches) 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 export
resolveLoss : (ChoiceMadedistNamebranches>*<ChoiceMadedistNamebranches) =%+>l->Loss (ProbabilisticChoicedistNamebranches) 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 export
SquaredError : {auto{conArg:1190} : Numa} ->Nega=>Loss (Consta) (Consta)
Totality: total
Visibility: public export
MeanSquaredError : IsCubicaln=> {auto{conArg:1234} : TensorMonoid (n.cont)} -> {auto{conArg:1240} : Numa} ->Nega=>Fractionala=>CastNata=>Loss (Const (Tensor [n] a)) (Const (Tensor [] a))
Totality: total
Visibility: public export
softargmaxCrossEntropyLogits : (Simplexnamen>*<Simplexnamen) =%+>Const (Tensor [] Double)
  The payoff object is the rank-0 tensor, not `Double`

Totality: total
Visibility: public export
SoftargmaxCrossEntropyLogits : Loss (Simplexnamen) (Const (Tensor [] Double))
Totality: total
Visibility: public export