layer

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer struct {
	nn.BaseModel
	Config                 config.Config
	SelfAttention          *multiheadattention.Model
	SelfAttentionLayerNorm *layernorm.Model
	FFN                    *stack.Model
	LayerNorm              *layernorm.Model
}

Layer implements a BART encoder layer.

func NewLayer

func NewLayer(config config.Config) *Layer

NewLayer returns a new BART encoder Layer.

func (*Layer) Forward

func (m *Layer) Forward(xs ...ag.Node) []ag.Node

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

Jump to

Keyboard shortcuts

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