Get the recurrent state for a linear attention layer.
(&self, block_idx: usize)
| 219 | |
| 220 | /// Get the recurrent state for a linear attention layer. |
| 221 | pub fn get_recurrent_state(&self, block_idx: usize) -> Option<&Tensor> { |
| 222 | self.recurrent_states[block_idx].as_ref() |
| 223 | } |
| 224 | |
| 225 | /// Set the recurrent state for a linear attention layer. |
| 226 | pub fn set_recurrent_state(&mut self, block_idx: usize, state: Tensor) { |
no outgoing calls