Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnsupportedSignatureMethodError = "signature (%s) contains unsupported method (%s)" UnsupportedAPISchemaError = "schemas for classify/regress APIs currently not supported" InconsistentInputOutputFormatError = "expecting all output tensors to have -1 in 0th dimension, like the input tensors" )
Known error messages
View Source
const B64KeySuffix string = "_bytes"
View Source
const (
MetaGraphNotFoundError = "model does not contain MetaGraph with tags %v"
)
Known error messages
View Source
const (
SignatureDefNotFoundError = "SignatureDef (%s) not found in specified MetaGraph"
)
Known error messages
View Source
const (
UnsupportedDataTypeError = "tensor (%s) contains unsupported data type (%s) for generating payloads"
)
Known error messages
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TFDType ¶
type TFDType int
const ( // all the possible constants that can be JSON-ified according to // https://www.tensorflow.org/tfx/serving/api_rest#json_mapping // along with a representation for B64 strings DtBool TFDType = iota DtB64String DtString DtInt8 DtUInt8 DtInt16 DtInt32 DtUInt32 DtInt64 DtUInt64 DtFloat DtDouble )
type TFMetaGraph ¶
type TFMetaGraph struct { SignatureDefs []TFSignatureDef Tags []string }
func NewTFMetaGraph ¶
func NewTFMetaGraph(metaGraph *pb.MetaGraphDef) (TFMetaGraph, error)
type TFSavedModel ¶
type TFSavedModel struct {
MetaGraphs []TFMetaGraph
}
func NewTFSavedModel ¶
func NewTFSavedModel(model *pb.SavedModel) (TFSavedModel, error)
type TFShape ¶
type TFShape []int64
func NewTFShape ¶
func NewTFShape(dimensions []*fw.TensorShapeProto_Dim) TFShape
type TFSignatureDef ¶
func NewTFSignatureDef ¶
func NewTFSignatureDef(key string, method string, inputs map[string]*pb.TensorInfo, outputs map[string]*pb.TensorInfo) (TFSignatureDef, error)
type TFTensor ¶
type TFTensor struct { // Name of the logical tensor Name string // Data type contained in this tensor DType TFDType // Length of the shape is rank when rank >= 0, nil otherwise Shape TFShape // If rank = -1, the shape is unknown. Otherwise, rank corresponds to the number of dimensions in this tensor Rank int64 }
func NewTFTensor ¶
func NewTFTensor(name string, tensor *pb.TensorInfo) (TFTensor, error)
Click to show internal directories.
Click to hide internal directories.