Skip to content

Commit

Permalink
segiter
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Apr 19, 2023
1 parent bb1067b commit ff5a237
Show file tree
Hide file tree
Showing 2 changed files with 197 additions and 179 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 @@ -204,6 +204,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) {
let sm = self.data.iter().map(|v| v.exp()).sum::<f32>();
Expand Down
Loading

0 comments on commit ff5a237

Please sign in to comment.