predict

package
v0.2.15-9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Predictor

type Predictor struct {
	Model     *tf.SavedModel
	InputName string
	ImgSize   int32
}

func NewPredictor

func NewPredictor(modeldir string, inputName string, imgSize int32) (Predictor, error)

declare method

func (Predictor) Predict

func (p Predictor) Predict(imagefile string) (int, error)

Predict - Return index with highest probability

func (Predictor) PredictWithDeviation

func (p Predictor) PredictWithDeviation(imagefile string) (classpred int, deviation float64, err error)

Predict - return class prediction and standard deviation

func (Predictor) PredictWithDeviationFromByteBufr

func (p Predictor) PredictWithDeviationFromByteBufr(bytes []byte) (classpred int, deviation float64, err error)

Predict - return class prediction and standard deviation

func (Predictor) PredictWithVariance

func (p Predictor) PredictWithVariance(imagefile string) (classpred int, deviation float64, err error)

Predict - return class prediction and standard deviation

func (Predictor) PredictionsArr

func (p Predictor) PredictionsArr(imagefile string) ([]float32, error)

PredictionsArr Return array of probabilities

func (Predictor) PredictionsArrFromByteBufr

func (p Predictor) PredictionsArrFromByteBufr(bytes []byte) ([]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