sample

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 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, y []int) *Sample

func (*Sample) Embedding

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

Embedding 生成一个样本,返回内容:x, y, paddingIdx

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