oa::FnMatrix::rnnCellLinear

rnnCellLinear: fused vanilla-RNN recurrent step — Linear(h, W_hh) + rnnCellPointwise. Replaces the per-timestep pair of dispatches with one kernel. inGatesI is the whole input projection [B*T, H]; inTimeOffset/inBatchStride index the current timestep's row directly, so oa::Rnn needs no per-step Slice. The hidden projection required by reverse mode is retained internally rather than exposed as an output parameter.

Function Documentation

Matrix oa::FnMatrix::rnnCellLinear( const Matrix & inGatesI, const Matrix & inHidden, const Matrix & inWeightHh, oa::U32 inTimeOffset = 0, oa::U32 inBatchStride = 1, const Matrix & inBiasHh = Matrix{} )
rnnCellLinear: fused vanilla-RNN recurrent step — Linear(h, W_hh) + rnnCellPointwise. Replaces the per-timestep pair of dispatches with one kernel. inGatesI is the whole input projection [B*T, H]; inTimeOffset/inBatchStride index the current timestep's row directly, so oa::Rnn needs no per-step Slice. The hidden projection required by reverse mode is retained internally rather than exposed as an output parameter.

Parameters

inGatesI
const Matrix &

inHidden
const Matrix &

inWeightHh
const Matrix &

inTimeOffset
oa::U32

Default: 0

inBatchStride
oa::U32

Default: 1

inBiasHh
const Matrix &

Default: Matrix{}

Returns

Matrix

The declared return value.