birnncrf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Bidirectional Recurrent Neural Network (BiRNN) with a Conditional Random Fields (CRF) on top.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	BiRNN  *birnn.Model
	Scorer *linear.Model
	CRF    *crf.Model
}

Model contains the serializable parameters.

func (*Model) NewProc

func (m *Model) NewProc(ctx nn.Context) nn.Processor

NewProc returns a new processor to execute the forward step.

type Processor

type Processor struct {
	nn.BaseProcessor
	// contains filtered or unexported fields
}

func (Processor) Forward

func (p Processor) Forward(xs ...ag.Node) []ag.Node

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

func (*Processor) NegativeLogLoss

func (p *Processor) NegativeLogLoss(targets []int) ag.Node

TODO: the CRF backward tests are still missing

func (*Processor) Predict

func (p *Processor) Predict(xs []ag.Node) []int

Jump to

Keyboard shortcuts

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