Struct finalfusion::norms::NdNorms
source · pub struct NdNorms { /* private fields */ }
Expand description
Chunk for storing embedding l2 norms.
Word embeddings are always l2-normalized in finalfusion. Sometimes it is useful to get the original unnormalized embeddings. The norms chunk is used for storing norms of in-vocabulary embeddings. The unnormalized embedding can be reconstructed by multiplying the normalized embedding by its orginal l2 norm.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for NdNorms
impl Send for NdNorms
impl Sync for NdNorms
impl Unpin for NdNorms
impl UnwindSafe for NdNorms
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more