sample

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sample

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

func New

func New(x []int, y int) *Sample

func (*Sample) Embedding

func (s *Sample) Embedding(paddingSize int, embedding [][]float32) ([]float32, []float32)

Embedding 生成一个样本,输出: sequence, next word

func (*Sample) Encode

func (s *Sample) Encode(vocabs []string) (string, string)

Encode 将内容转换为文字

Jump to

Keyboard shortcuts

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