oa::FnMatrix::rnnScan

rnnScan: whole-sequence vanilla-RNN recurrent scan in ONE dispatch. Mathematically identical to running rnnCellLinear for each timestep, but collapses S dispatches into 1. The recurrent weight/bias gradient is computed separately via linearWeightBiasBwd on the saved hPrev.

Function Documentation

RnnScanResult oa::FnMatrix::rnnScan( const Matrix & inGatesI, const Matrix & inWeightHh, oa::I32 inHiddenSize, oa::I32 inSeqLen, oa::I32 inBatch, const Matrix & inBiasHh = Matrix{} )
rnnScan: whole-sequence vanilla-RNN recurrent scan in ONE dispatch. Mathematically identical to running rnnCellLinear for each timestep, but collapses S dispatches into 1. The recurrent weight/bias gradient is computed separately via linearWeightBiasBwd on the saved hPrev.

Parameters

inGatesI
const Matrix &

[B*S, H] precomputed input projection (row b*S+t = timestep t)

inWeightHh
const Matrix &

inHiddenSize
oa::I32

inSeqLen
oa::I32

inBatch
oa::I32

inBiasHh
const Matrix &

Default: Matrix{}

Returns

RnnScanResult

The declared return value.