Documentation ¶
Index ¶
- type ArrayDataType
- type ArrayProto
- type ITFservingRequest
- type PredictRequest
- type PredictResponse
- type TFservingModel
- type TFservingRequest
- func (r *TFservingRequest) GetResponseFunc() response.ResponseFunc
- func (r *TFservingRequest) Invoke(requestData interface{}) (response interface{}, err error)
- func (r *TFservingRequest) SetOutputs(outputs []string)
- func (r *TFservingRequest) SetResponseFunc(name string)
- func (r *TFservingRequest) SetSignatureName(name string)
- func (r *TFservingRequest) SetTimeout(timeout int)
- func (r *TFservingRequest) SetUrl(url string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayDataType ¶
type ArrayDataType int32
const ( // Not a legal value for DataType. Used to indicate a DataType field // has not been set. ArrayDataType_DT_INVALID ArrayDataType = 0 // Data types that all computation devices are expected to be // capable to support. ArrayDataType_DT_FLOAT ArrayDataType = 1 ArrayDataType_DT_DOUBLE ArrayDataType = 2 ArrayDataType_DT_INT32 ArrayDataType = 3 ArrayDataType_DT_UINT8 ArrayDataType = 4 ArrayDataType_DT_INT16 ArrayDataType = 5 ArrayDataType_DT_INT8 ArrayDataType = 6 ArrayDataType_DT_STRING ArrayDataType = 7 ArrayDataType_DT_COMPLEX64 ArrayDataType = 8 ArrayDataType_DT_INT64 ArrayDataType = 9 ArrayDataType_DT_BOOL ArrayDataType = 10 ArrayDataType_DT_QINT8 ArrayDataType = 11 ArrayDataType_DT_QUINT8 ArrayDataType = 12 ArrayDataType_DT_QINT32 ArrayDataType = 13 ArrayDataType_DT_BFLOAT16 ArrayDataType = 14 ArrayDataType_DT_QINT16 ArrayDataType = 15 ArrayDataType_DT_QUINT16 ArrayDataType = 16 ArrayDataType_DT_UINT16 ArrayDataType = 17 ArrayDataType_DT_COMPLEX128 ArrayDataType = 18 ArrayDataType_DT_HALF ArrayDataType = 19 ArrayDataType_DT_RESOURCE ArrayDataType = 20 ArrayDataType_DT_VARIANT ArrayDataType = 21 ArrayDataType_DT_DIM_FLOAT ArrayDataType = 22 ArrayDataType_DT_DIM_DOUBLE ArrayDataType = 23 )
type ArrayProto ¶
type ArrayProto struct { // Data Type. Dtype ArrayDataType `protobuf:"varint,1,opt,name=dtype,proto3,enum=ArrayDataType" json:"dtype,omitempty"` // DT_FLOAT. FloatVal []float32 `protobuf:"fixed32,3,rep,packed,name=float_val,json=floatVal,proto3" json:"float_val,omitempty"` // DT_DOUBLE. DoubleVal []float64 `protobuf:"fixed64,4,rep,packed,name=double_val,json=doubleVal,proto3" json:"double_val,omitempty"` // DT_INT32, DT_INT16, DT_INT8, DT_UINT8. IntVal []int32 `protobuf:"varint,5,rep,packed,name=int_val,json=intVal,proto3" json:"int_val,omitempty"` // DT_STRING. StringVal []string `protobuf:"bytes,6,rep,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"` // DT_INT64. Int64Val []int64 `protobuf:"varint,7,rep,packed,name=int64_val,json=int64Val,proto3" json:"int64_val,omitempty"` // DT_BOOL. BoolVal []bool `protobuf:"varint,8,rep,packed,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"` DimFloatVal [][]float32 `protobuf:"fixed32,3,rep,packed,name=float_val,json=dimFloatVal,proto3" json:"dim_float_val,omitempty"` DimDoubleVal [][]float64 `protobuf:"fixed32,3,rep,packed,name=float_val,json=dimDoubleVal,proto3" json:"dim_double_val,omitempty"` }
func (ArrayProto) GetVal ¶
func (v ArrayProto) GetVal() interface{}
type ITFservingRequest ¶
type ITFservingRequest interface { Invoke(requestData interface{}) (body interface{}, err error) GetResponseFunc() response.ResponseFunc }
type PredictRequest ¶
type PredictRequest struct { // A named signature to evaluate. If unspecified, the default signature // will be used SignatureName string `protobuf:"bytes,1,opt,name=signature_name,json=signatureName,proto3" json:"signature_name,omitempty"` // Input tensors. // Names of input tensor are alias names. The mapping from aliases to real // input tensor names is expected to be stored as named generic signature // under the key "inputs" in the model export. // Each alias listed in a generic signature named "inputs" should be provided // exactly once in order to run the prediction. Inputs map[string]interface{} `` /* 153-byte string literal not displayed */ // Output filter. // Names specified are alias names. The mapping from aliases to real output // tensor names is expected to be stored as named generic signature under // the key "outputs" in the model export. // Only tensors specified here will be run/fetched and returned, with the // exception that when none is specified, all tensors specified in the // named signature will be run/fetched and returned. OutputFilter []string `protobuf:"bytes,3,rep,name=output_filter,json=outputFilter,proto3" json:"output_filter,omitempty"` }
func NewPredictRequest ¶
func NewPredictRequest() *PredictRequest
type PredictResponse ¶
type PredictResponse struct { // Output tensors. Outputs [][]float64 `` /* 155-byte string literal not displayed */ }
type TFservingModel ¶
type TFservingModel struct {
// contains filtered or unexported fields
}
func NewTFservingModel ¶
func NewTFservingModel(name string) *TFservingModel
func (*TFservingModel) Init ¶
func (m *TFservingModel) Init(conf *recconf.AlgoConfig) error
func (*TFservingModel) Run ¶
func (m *TFservingModel) Run(algoData interface{}) (interface{}, error)
type TFservingRequest ¶
type TFservingRequest struct { SignatureName string Outputs []string // contains filtered or unexported fields }
func (*TFservingRequest) GetResponseFunc ¶
func (r *TFservingRequest) GetResponseFunc() response.ResponseFunc
func (*TFservingRequest) Invoke ¶
func (r *TFservingRequest) Invoke(requestData interface{}) (response interface{}, err error)
func (*TFservingRequest) SetOutputs ¶
func (r *TFservingRequest) SetOutputs(outputs []string)
func (*TFservingRequest) SetResponseFunc ¶
func (r *TFservingRequest) SetResponseFunc(name string)
func (*TFservingRequest) SetSignatureName ¶
func (r *TFservingRequest) SetSignatureName(name string)
func (*TFservingRequest) SetTimeout ¶
func (r *TFservingRequest) SetTimeout(timeout int)
func (*TFservingRequest) SetUrl ¶
func (r *TFservingRequest) SetUrl(url string)
Click to show internal directories.
Click to hide internal directories.