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 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 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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.