Fork me on GitHub
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood

Module cross_entropy_losses

Types

SigmoidCrossEntropyLoss[TT] = ref object of Loss[TT]
  cache: Variable[TT]
  Source Edit
SoftmaxCrossEntropyLoss[TT] = ref object of Loss[TT]
  cache: Variable[TT]
  Source Edit
SparseSoftmaxCrossEntropyLoss[TT] = ref object of SparseLoss[TT]
  cache: Variable[TT]
  Source Edit

Procs

proc sigmoid_cross_entropy[TT](a344065: Variable[TT]; target344067: TT): Variable[TT]
  Source Edit
proc softmax_cross_entropy[TT](a344130: Variable[TT]; target344132: TT): Variable[TT]
  Source Edit
proc sparse_softmax_crossentropy[TT](a: Variable[TT]; target: Tensor[int]): Variable[
    TT]
  Source Edit

Methods

method forward[TT](self344055: SigmoidCrossEntropyLoss[TT];
                  a344057: Variable[TT]; target344059: TT): Variable[TT] {.
inline, locks: 0
.}
  Source Edit
method backward[TT](self344061: SigmoidCrossEntropyLoss[TT]; gradient344063: TT): SmallDiffs[
    TT] {.
noInit, inline, locks: 0
.}
  Source Edit
method forward[TT](self344120: SoftmaxCrossEntropyLoss[TT];
                  a344122: Variable[TT]; target344124: TT): Variable[TT] {.
inline, locks: 0
.}
  Source Edit
method backward[TT](self344126: SoftmaxCrossEntropyLoss[TT]; gradient344128: TT): SmallDiffs[
    TT] {.
noInit, inline, locks: 0
.}
  Source Edit
method forward[TT](self: SparseSoftmaxCrossEntropyLoss[TT]; a: Variable[TT];
                  target: Tensor[int]): Variable[TT] {.
inline, locks: 0
.}
  Source Edit
method backward[TT](self: SparseSoftmaxCrossEntropyLoss[TT]; gradient: TT): SmallDiffs[
    TT] {.
noInit, inline, locks: 0
.}
  Source Edit