predict

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ImageHeight = 128
View Source
const ImageWidth = 128

Variables

This section is empty.

Functions

This section is empty.

Types

type Predictor

type Predictor struct {
	Model *tf.SavedModel
}

func NewPredictor

func NewPredictor(modeldir string) (Predictor, error)

declare method

func (Predictor) Predict

func (p Predictor) Predict(imagefile string, model *tf.SavedModel) (int, error)

Predict - Return index with highest probability

func (Predictor) PredictWithDeviation

func (p Predictor) PredictWithDeviation(imagefile string, model *tf.SavedModel) (classpred int, deviation float32, err error)

Predict - return class prediction and standard deviation

func (Predictor) PredictionsArr

func (p Predictor) PredictionsArr(imagefile string, model *tf.SavedModel) ([]float32, error)

PredictionsArr Return array of probabilities

Jump to

Keyboard shortcuts

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