oa::FnMatrix::gruCellPointwise
gruCellPointwise: fused GRU pointwise forward. r = sigmoid(gatesI[r] + gatesH[r]) z = sigmoid(gatesI[z] + gatesH[z]) n = tanh(gatesI[n] + r * gatesH[n]) h_new = (1 - z) * n + z * hPrev
Function Documentation
gruCellPointwise: fused GRU pointwise forward. r = sigmoid(gatesI[r] + gatesH[r]) z = sigmoid(gatesI[z] + gatesH[z]) n = tanh(gatesI[n] + r * gatesH[n]) h_new = (1 - z) * n + z * hPrev
Parameters
inGatesIconst Matrix &[B, 3H] input projection (reset|update|candidate along dim 1) or [B*T, 3H] with inTimeOffset = t*B to index row t without Slice
inGatesHconst Matrix &[B, 3H] hidden projection
inHiddenconst Matrix &[B, H] previous hidden state
inHiddenSizeoa::I32H
inTimeOffsetoa::U32row offset into inGatesI (in units of 3H), default 0
inBatchStrideoa::U32Default: 1
Returns
MatrixThe declared return value.