lstm

package
v0.0.0-...-61db93c Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reverse

func Reverse(x *gorgonia.Node, axis int) (*gorgonia.Node, error)

Types

type LSTMModule

type LSTMModule struct {
	// contains filtered or unexported fields
}

func LSTM

func LSTM(m *godl.Model, opts LSTMOpts) *LSTMModule

func (*LSTMModule) Forward

func (m *LSTMModule) Forward(inputs ...*godl.Node) godl.Nodes

func (*LSTMModule) Name

func (m *LSTMModule) Name() string

type LSTMOpts

type LSTMOpts struct {
	InputDimension int
	HiddenSize     int
	// Layers         int
	Bidirectional bool
	MergeMode     MergeMode

	WithBias              bool
	WeightsInit, BiasInit gorgonia.InitWFn

	RecurrentActivation activation.Function
	Activation          activation.Function
}

type MergeMode

type MergeMode string
const (
	MergeModeConcat  MergeMode = "concat"
	MergeModeSum     MergeMode = "sum"
	MergeModeAverage MergeMode = "avg"
	MergeModeMul     MergeMode = "mul"
)

Jump to

Keyboard shortcuts

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