[][src]Struct finalfusion::norms::NdNorms

pub struct NdNorms { /* fields omitted */ }

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.

Methods

impl NdNorms[src]

pub fn new(norms: impl Into<Array1<f32>>) -> Self[src]

Construct new NdNorms.

Trait Implementations

impl Clone for NdNorms[src]

impl Debug for NdNorms[src]

impl Deref for NdNorms[src]

type Target = Array1<f32>

The resulting type after dereferencing.

impl<V> From<V> for NdNorms where
    V: Into<Array1<f32>>, 
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,