mlengine

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterpreterOptions

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

InterpreterOptions represents a TensorFlow Lite InterpreterOptions.

type MlEngine

type MlEngine interface {
	GetSpamValue(issue *spamcheck.Issue) float32
}

func CreateMlEngine

func CreateMlEngine(cfg *config.Config) MlEngine

type Tensor

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

Tensor represents TensorFlow Lite Tensor.

func (*Tensor) ByteSize

func (t *Tensor) ByteSize() uint

ByteSize() returns byte size of the tensor.

func (*Tensor) CopyFromBuffer

func (t *Tensor) CopyFromBuffer(b interface{}) C.TfLiteStatus

CopyFromBuffer write buffer to the tensor.

func (*Tensor) Float32s

func (t *Tensor) Float32s() []float32

func (*Tensor) Type

func (t *Tensor) Type() TensorType

Type() returns TensorType.

type TensorType

type TensorType int

TensorType is types of the tensor.

const (
	TfLiteNoType TensorType = iota
	TfLiteFloat32
)

Tensors type

Jump to

Keyboard shortcuts

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