[−][src]Trait finalfusion::text::WriteTextDims
Method to write Embeddings
to a text file.
This trait defines an extension to Embeddings
to write the word embeddings
as text. The text will contain one word embedding per line in the following
format:
word0 component_1 component_2 ... component_n
Required methods
fn write_text_dims(
&self,
writer: &mut W,
unnormalize: bool
) -> Result<(), Error>
&self,
writer: &mut W,
unnormalize: bool
) -> Result<(), Error>
Write the embeddings to the given writer.
If unnormalize
is true
, the norms vector is used to
restore the original vector magnitudes.
Implementors
impl<W, V, S> WriteTextDims<W> for Embeddings<V, S> where
W: Write,
V: Vocab,
S: Storage,
[src]
W: Write,
V: Vocab,
S: Storage,