domain

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//DefaultSignatureKey signature key
	DefaultSignatureKey = "serving_default"
)

Variables

This section is empty.

Functions

func Transform

func Transform(ctx context.Context, signature *Signature, input *gtly.Object, output interface{}) (common.Storable, error)

The default Transformer will create an object that when marshalled will return as close to the the TensorFlow SavedModel signature as possible; with the caveat that any output will be keyed by the output tensor's name.

Types

type Feed

type Feed struct {
	Name  string
	Value interface{}
}

Feed represents data feed

type Input

type Input struct {
	Name  string
	Index int
	reflect.Type
	Placeholder tf.Output
	Wildcard    bool // true if embedded vocabulary should be ignored
	Auxiliary   bool // true if this input isn't part of the model
	Layer       string
}

Input represents model and request input

type Output

type Output struct {
	Name         string
	DataType     string
	DataTypeKind reflect.Kind
	Index        int
	*tf.Operation
}

Output represents model output

type Signature

type Signature struct {
	Method  string
	Inputs  []Input
	Output  Output
	Outputs []Output
}

Signature represents model signature

type Transformer

type Transformer func(ctx context.Context, signature *Signature, input *gtly.Object, output interface{}) (common.Storable, error)

Transformer is an adapter module used when the output of the TensorFlow model wants to be modified server side. signature is the Signature of the relevant model, determined by request context. input is the request body unmarshalled. output is the TensorFlow SavedModel output.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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