[][src]Trait finalfusion::io::ReadEmbeddings

pub trait ReadEmbeddings where
    Self: Sized
{ fn read_embeddings<R>(read: &mut R) -> Result<Self>
    where
        R: Read + Seek
; }

Read finalfusion embeddings.

This trait is used to read embeddings in the finalfusion format. Implementations are provided for the vocabulary and storage types in this crate.

use std::fs::File;

use finalfusion::prelude::*;

let mut f = File::open("testdata/similarity.fifu").unwrap();
let embeddings: Embeddings<VocabWrap, StorageWrap> =
    Embeddings::read_embeddings(&mut f).unwrap();

Required methods

fn read_embeddings<R>(read: &mut R) -> Result<Self> where
    R: Read + Seek

Read the embeddings.

Loading content...

Implementors

impl<V, S> ReadEmbeddings for Embeddings<V, S> where
    V: ReadChunk,
    S: ReadChunk, 
[src]

Loading content...