Skip to content

Commit

Permalink
Computing LSTM forward layer without allocating (#3351)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored May 4, 2023
1 parent 2f5c923 commit 5ab0f5f
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 184 deletions.
1 change: 1 addition & 0 deletions components/segmenter/src/complex/lstm/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ impl<'a, const D: usize> MatrixBorrowedMut<'a, D> {
Some(())
}

#[allow(dead_code)] // maybe needed for more complicated bies calculations
/// Mutates this matrix by applying a softmax transformation.
pub(super) fn softmax_transform(&mut self) {
for v in self.data.iter_mut() {
Expand Down
Loading

0 comments on commit 5ab0f5f

Please sign in to comment.