tf

package
v0.0.0-...-d1695c4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxMsgLength = 1024 * 1024 * 64 // 64 MB
)

Variables

This section is empty.

Functions

func CallServing

func CallServing(ctx context.Context, servingAddr string, jsonData []byte) ([]byte, error, int)

func CallTF

func CallTF(ctx context.Context, servingAddr string, model string, version int64,
	signature string, modelData ModelData) (map[string]interface{}, error, int)

func NoSuchHostError

func NoSuchHostError(err error) bool

Types

type InputJSON

type InputJSON struct {
	Dtype tf.DataType `json:"dtype,omitempty"`
	Data  interface{} `json:"data,omitempty"`
}

func (*InputJSON) Tensor

func (t *InputJSON) Tensor() (*tf.TensorProto, error)

type ModelData

type ModelData struct {
	Inputs      map[string]InputJSON `json:"inputs,omitempty"`
	OutFilter   []string             `json:"out_filter,omitempty"`
	OutMimeType string               `json:"out_mime_type,omitempty"`
}

Jump to

Keyboard shortcuts

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