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

Module gates_reduce

Types

MeanGate[TT] = ref object of Gate[TT]
  cached_input_shape: MetadataArray
TODO: generalize to C <- alpha AB + C   Source Edit

Procs

proc mean[TT](a: Variable[TT]): Variable[TT]
  Source Edit

Methods

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