captured method

Float32List captured(
  1. int slot,
  2. int n
)

After a forward of n tokens with capture: the residual entering layer 0 (slot 0) and leaving each layer (slot i + 1), n rows each.

Implementation

Float32List captured(int slot, int n) {
  final rows = maxChunk * config.hiddenSize;
  return Float32List.sublistView(
    _capture.view,
    slot * rows,
    slot * rows + n * config.hiddenSize,
  );
}