tfmodel

package
v0.12.12-b Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TFSessionPanicDuration time.Duration = 1 * time.Minute

Functions

func Export

func Export(session *tf.Session, graph *tf.Graph, name string) (interface{}, error)

Export attempts to pull the embedded lookup table from the Tensorflow graph.

func MatchOperation

func MatchOperation(graph *tf.Graph, name string) string

MatchOperation will attempt to locate an LookupTableExportV2 operation that is associated to the provided name.

func RunExport

func RunExport(session *tf.Session, exportOp *tf.Operation) (interface{}, error)

RunExport runs export

func Signature

func Signature(model *tf.SavedModel) (*domain.Signature, error)

Signature searches the Tensorflow operation graph for inputs and outputs.

Types

type Evaluator

type Evaluator struct {
	domain.Signature
	// contains filtered or unexported fields
}

Evaluator represents evaluator

func NewEvaluator

func NewEvaluator(id string, signature *domain.Signature, session *tf.Session) *Evaluator

NewEvaluator creates new evaluator

func (*Evaluator) Close

func (e *Evaluator) Close() error

Close closes evaluator

func (*Evaluator) Evaluate

func (e *Evaluator) Evaluate(params []interface{}) ([]interface{}, error)

Evaluate evaluates model

Jump to

Keyboard shortcuts

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