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 Placeholder tf.Output // TODO refactor out this usage in service/domain.Signature is different from its usage in service/request.Request Vocab bool // false if embedded vocabulary should be ignored Auxiliary bool // true if this input isn't part of the model reflect.Type }
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 // Deprecated: Use Outputs[0] if there is only 1 output Outputs []Output }
Signature represents Tensorflow SavedModel function 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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.