fofe

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2021 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package fofe provides an implementation of the Fixed-size Ordinally-Forgetting Encoding (FOFE) method.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BiEncode

func BiEncode(alpha mat.Float, size int, seq []int) (fwd []mat.Matrix, bwd []mat.Matrix)

BiEncode is the FOFE bidirectional encoding function.

func Decode

func Decode(alpha mat.Float, z mat.Matrix) []int

Decode is the FOFE decoding function.

func Encode

func Encode(alpha mat.Float, size int, seq []int) []mat.Matrix

Encode is the FOFE encoding function, which works with Sparse matrices.

Reference recursive formula: z(t) = α · z(t−1) + e(t), where 1 ≤ t ≤ T

func EncodeDense

func EncodeDense(alpha mat.Float, size int, seq []int) []mat.Matrix

EncodeDense is similar to Encode, but it works with Dense matrices.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL