encoder

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	nn.BaseModel
	Config             config.Config
	Layers             *stack.Model
	PositionalEncoder  positionalencoder.Encoder
	EmbeddingLayerNorm *layernorm.Model
	LayerNorm          *layernorm.Model
}

Model implements a BART encoder.

func New

func New(config config.Config) *Model

New returns a new BART encoder Model.

func (*Model) Encode

func (m *Model) Encode(xs []ag.Node) []ag.Node

Encode performs the forward step for each input node and returns the result.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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