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

Module tanh

Types

TanhActivation[TT] = ref object of Gate[TT]
  cache: TT
  Source Edit

Procs

proc tanh[TT](a: Variable[TT]): Variable[TT]
Input:
  • A variable
  Source Edit

Methods

method forward[TT](self: TanhActivation[TT]; a: Variable[TT]): Variable[TT] {.
inline, locks: 0
.}
  Source Edit
method backward[TT](self: TanhActivation[TT]; gradient: TT): SmallDiffs[TT] {.
noInit, inline, locks: 0
.}
  Source Edit