types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const B64KeySuffix string = "_bytes"

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
)

func NewTFDType

func NewTFDType(name string, dType string) (TFDType, error)

type TFMetaGraph

type TFMetaGraph struct {
	SignatureDefs []TFSignatureDef
	Tags          []string
}

func NewTFMetaGraph

func NewTFMetaGraph(metaGraph *pb.MetaGraphDef) (TFMetaGraph, error)

func (*TFMetaGraph) Schema

func (t *TFMetaGraph) Schema() *openapi3.Schema

type TFMethod

type TFMethod int
const (
	Predict TFMethod = iota
	Classify
	Regress
)

func NewTFMethod

func NewTFMethod(key string, method string) (TFMethod, error)

type TFSavedModel

type TFSavedModel struct {
	MetaGraphs []TFMetaGraph
}

func NewTFSavedModel

func NewTFSavedModel(model *pb.SavedModel) (TFSavedModel, error)

func (*TFSavedModel) Schema

func (t *TFSavedModel) Schema() *openapi3.Schema

type TFShape

type TFShape []int64

func NewTFShape

func NewTFShape(dimensions []*fw.TensorShapeProto_Dim) TFShape

type TFSignatureDef

type TFSignatureDef struct {
	Key     string
	Method  TFMethod
	Inputs  []TFTensor
	Outputs []TFTensor
}

func NewTFSignatureDef

func NewTFSignatureDef(key string, method string, inputs map[string]*pb.TensorInfo, outputs map[string]*pb.TensorInfo) (TFSignatureDef, error)

func (*TFSignatureDef) Schema

func (t *TFSignatureDef) Schema() *openapi3.Schema

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)

func (*TFTensor) Schema

func (t *TFTensor) Schema() *openapi3.Schema

Jump to

Keyboard shortcuts

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