Documentation ¶
Overview ¶
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/attr_value.proto
It has these top-level messages:
AttrValue NameAttrList
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/function.proto
It has these top-level messages:
FunctionDefLibrary FunctionDef GradientDef
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/graph.proto
It has these top-level messages:
GraphDef
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/node_def.proto
It has these top-level messages:
NodeDef
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/op_def.proto
It has these top-level messages:
OpDef OpDeprecation OpList
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/resource_handle.proto
It has these top-level messages:
ResourceHandleProto
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/tensor.proto
It has these top-level messages:
TensorProto VariantTensorDataProto
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/tensor_shape.proto
It has these top-level messages:
TensorShapeProto
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/types.proto
It has these top-level messages:
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/framework/versions.proto
It has these top-level messages:
VersionDef
Index ¶
- Variables
- type AttrValue
- func (*AttrValue) Descriptor() ([]byte, []int)
- func (m *AttrValue) GetB() bool
- func (m *AttrValue) GetF() float32
- func (m *AttrValue) GetFunc() *NameAttrList
- func (m *AttrValue) GetI() int64
- func (m *AttrValue) GetList() *AttrValue_ListValue
- func (m *AttrValue) GetPlaceholder() string
- func (m *AttrValue) GetS() []byte
- func (m *AttrValue) GetShape() *TensorShapeProto
- func (m *AttrValue) GetTensor() *TensorProto
- func (m *AttrValue) GetType() DataType
- func (m *AttrValue) GetValue() isAttrValue_Value
- func (*AttrValue) ProtoMessage()
- func (m *AttrValue) Reset()
- func (m *AttrValue) String() string
- func (*AttrValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type AttrValue_B
- type AttrValue_F
- type AttrValue_Func
- type AttrValue_I
- type AttrValue_List
- type AttrValue_ListValue
- func (*AttrValue_ListValue) Descriptor() ([]byte, []int)
- func (m *AttrValue_ListValue) GetB() []bool
- func (m *AttrValue_ListValue) GetF() []float32
- func (m *AttrValue_ListValue) GetFunc() []*NameAttrList
- func (m *AttrValue_ListValue) GetI() []int64
- func (m *AttrValue_ListValue) GetS() [][]byte
- func (m *AttrValue_ListValue) GetShape() []*TensorShapeProto
- func (m *AttrValue_ListValue) GetTensor() []*TensorProto
- func (m *AttrValue_ListValue) GetType() []DataType
- func (*AttrValue_ListValue) ProtoMessage()
- func (m *AttrValue_ListValue) Reset()
- func (m *AttrValue_ListValue) String() string
- type AttrValue_Placeholder
- type AttrValue_S
- type AttrValue_Shape
- type AttrValue_Tensor
- type AttrValue_Type
- type DataType
- type FunctionDef
- func (*FunctionDef) Descriptor() ([]byte, []int)
- func (m *FunctionDef) GetAttr() map[string]*AttrValue
- func (m *FunctionDef) GetNodeDef() []*NodeDef
- func (m *FunctionDef) GetRet() map[string]string
- func (m *FunctionDef) GetSignature() *OpDef
- func (*FunctionDef) ProtoMessage()
- func (m *FunctionDef) Reset()
- func (m *FunctionDef) String() string
- type FunctionDefLibrary
- type GradientDef
- type GraphDef
- func (*GraphDef) Descriptor() ([]byte, []int)
- func (m *GraphDef) GetLibrary() *FunctionDefLibrary
- func (m *GraphDef) GetNode() []*NodeDef
- func (m *GraphDef) GetVersion() int32
- func (m *GraphDef) GetVersions() *VersionDef
- func (*GraphDef) ProtoMessage()
- func (m *GraphDef) Reset()
- func (m *GraphDef) String() string
- type NameAttrList
- type NodeDef
- func (*NodeDef) Descriptor() ([]byte, []int)
- func (m *NodeDef) GetAttr() map[string]*AttrValue
- func (m *NodeDef) GetDevice() string
- func (m *NodeDef) GetInput() []string
- func (m *NodeDef) GetName() string
- func (m *NodeDef) GetOp() string
- func (*NodeDef) ProtoMessage()
- func (m *NodeDef) Reset()
- func (m *NodeDef) String() string
- type OpDef
- func (*OpDef) Descriptor() ([]byte, []int)
- func (m *OpDef) GetAllowsUninitializedInput() bool
- func (m *OpDef) GetAttr() []*OpDef_AttrDef
- func (m *OpDef) GetDeprecation() *OpDeprecation
- func (m *OpDef) GetDescription() string
- func (m *OpDef) GetInputArg() []*OpDef_ArgDef
- func (m *OpDef) GetIsAggregate() bool
- func (m *OpDef) GetIsCommutative() bool
- func (m *OpDef) GetIsStateful() bool
- func (m *OpDef) GetName() string
- func (m *OpDef) GetOutputArg() []*OpDef_ArgDef
- func (m *OpDef) GetSummary() string
- func (*OpDef) ProtoMessage()
- func (m *OpDef) Reset()
- func (m *OpDef) String() string
- type OpDef_ArgDef
- func (*OpDef_ArgDef) Descriptor() ([]byte, []int)
- func (m *OpDef_ArgDef) GetDescription() string
- func (m *OpDef_ArgDef) GetIsRef() bool
- func (m *OpDef_ArgDef) GetName() string
- func (m *OpDef_ArgDef) GetNumberAttr() string
- func (m *OpDef_ArgDef) GetType() DataType
- func (m *OpDef_ArgDef) GetTypeAttr() string
- func (m *OpDef_ArgDef) GetTypeListAttr() string
- func (*OpDef_ArgDef) ProtoMessage()
- func (m *OpDef_ArgDef) Reset()
- func (m *OpDef_ArgDef) String() string
- type OpDef_AttrDef
- func (*OpDef_AttrDef) Descriptor() ([]byte, []int)
- func (m *OpDef_AttrDef) GetAllowedValues() *AttrValue
- func (m *OpDef_AttrDef) GetDefaultValue() *AttrValue
- func (m *OpDef_AttrDef) GetDescription() string
- func (m *OpDef_AttrDef) GetHasMinimum() bool
- func (m *OpDef_AttrDef) GetMinimum() int64
- func (m *OpDef_AttrDef) GetName() string
- func (m *OpDef_AttrDef) GetType() string
- func (*OpDef_AttrDef) ProtoMessage()
- func (m *OpDef_AttrDef) Reset()
- func (m *OpDef_AttrDef) String() string
- type OpDeprecation
- type OpList
- type ResourceHandleProto
- func (*ResourceHandleProto) Descriptor() ([]byte, []int)
- func (m *ResourceHandleProto) GetContainer() string
- func (m *ResourceHandleProto) GetDevice() string
- func (m *ResourceHandleProto) GetHashCode() uint64
- func (m *ResourceHandleProto) GetMaybeTypeName() string
- func (m *ResourceHandleProto) GetName() string
- func (*ResourceHandleProto) ProtoMessage()
- func (m *ResourceHandleProto) Reset()
- func (m *ResourceHandleProto) String() string
- type TensorProto
- func (*TensorProto) Descriptor() ([]byte, []int)
- func (m *TensorProto) GetBoolVal() []bool
- func (m *TensorProto) GetDcomplexVal() []float64
- func (m *TensorProto) GetDoubleVal() []float64
- func (m *TensorProto) GetDtype() DataType
- func (m *TensorProto) GetFloatVal() []float32
- func (m *TensorProto) GetHalfVal() []int32
- func (m *TensorProto) GetInt64Val() []int64
- func (m *TensorProto) GetIntVal() []int32
- func (m *TensorProto) GetResourceHandleVal() []*ResourceHandleProto
- func (m *TensorProto) GetScomplexVal() []float32
- func (m *TensorProto) GetStringVal() [][]byte
- func (m *TensorProto) GetTensorContent() []byte
- func (m *TensorProto) GetTensorShape() *TensorShapeProto
- func (m *TensorProto) GetVariantVal() []*VariantTensorDataProto
- func (m *TensorProto) GetVersionNumber() int32
- func (*TensorProto) ProtoMessage()
- func (m *TensorProto) Reset()
- func (m *TensorProto) String() string
- type TensorShapeProto
- type TensorShapeProto_Dim
- type VariantTensorDataProto
- func (*VariantTensorDataProto) Descriptor() ([]byte, []int)
- func (m *VariantTensorDataProto) GetMetadata() []byte
- func (m *VariantTensorDataProto) GetTensors() []*TensorProto
- func (m *VariantTensorDataProto) GetTypeName() string
- func (*VariantTensorDataProto) ProtoMessage()
- func (m *VariantTensorDataProto) Reset()
- func (m *VariantTensorDataProto) String() string
- type VersionDef
Constants ¶
This section is empty.
Variables ¶
var DataType_name = map[int32]string{
0: "DT_INVALID",
1: "DT_FLOAT",
2: "DT_DOUBLE",
3: "DT_INT32",
4: "DT_UINT8",
5: "DT_INT16",
6: "DT_INT8",
7: "DT_STRING",
8: "DT_COMPLEX64",
9: "DT_INT64",
10: "DT_BOOL",
11: "DT_QINT8",
12: "DT_QUINT8",
13: "DT_QINT32",
14: "DT_BFLOAT16",
15: "DT_QINT16",
16: "DT_QUINT16",
17: "DT_UINT16",
18: "DT_COMPLEX128",
19: "DT_HALF",
20: "DT_RESOURCE",
21: "DT_VARIANT",
101: "DT_FLOAT_REF",
102: "DT_DOUBLE_REF",
103: "DT_INT32_REF",
104: "DT_UINT8_REF",
105: "DT_INT16_REF",
106: "DT_INT8_REF",
107: "DT_STRING_REF",
108: "DT_COMPLEX64_REF",
109: "DT_INT64_REF",
110: "DT_BOOL_REF",
111: "DT_QINT8_REF",
112: "DT_QUINT8_REF",
113: "DT_QINT32_REF",
114: "DT_BFLOAT16_REF",
115: "DT_QINT16_REF",
116: "DT_QUINT16_REF",
117: "DT_UINT16_REF",
118: "DT_COMPLEX128_REF",
119: "DT_HALF_REF",
120: "DT_RESOURCE_REF",
121: "DT_VARIANT_REF",
}
var DataType_value = map[string]int32{
"DT_INVALID": 0,
"DT_FLOAT": 1,
"DT_DOUBLE": 2,
"DT_INT32": 3,
"DT_UINT8": 4,
"DT_INT16": 5,
"DT_INT8": 6,
"DT_STRING": 7,
"DT_COMPLEX64": 8,
"DT_INT64": 9,
"DT_BOOL": 10,
"DT_QINT8": 11,
"DT_QUINT8": 12,
"DT_QINT32": 13,
"DT_BFLOAT16": 14,
"DT_QINT16": 15,
"DT_QUINT16": 16,
"DT_UINT16": 17,
"DT_COMPLEX128": 18,
"DT_HALF": 19,
"DT_RESOURCE": 20,
"DT_VARIANT": 21,
"DT_FLOAT_REF": 101,
"DT_DOUBLE_REF": 102,
"DT_INT32_REF": 103,
"DT_UINT8_REF": 104,
"DT_INT16_REF": 105,
"DT_INT8_REF": 106,
"DT_STRING_REF": 107,
"DT_COMPLEX64_REF": 108,
"DT_INT64_REF": 109,
"DT_BOOL_REF": 110,
"DT_QINT8_REF": 111,
"DT_QUINT8_REF": 112,
"DT_QINT32_REF": 113,
"DT_BFLOAT16_REF": 114,
"DT_QINT16_REF": 115,
"DT_QUINT16_REF": 116,
"DT_UINT16_REF": 117,
"DT_COMPLEX128_REF": 118,
"DT_HALF_REF": 119,
"DT_RESOURCE_REF": 120,
"DT_VARIANT_REF": 121,
}
Functions ¶
This section is empty.
Types ¶
type AttrValue ¶
type AttrValue struct { // Types that are valid to be assigned to Value: // *AttrValue_S // *AttrValue_I // *AttrValue_F // *AttrValue_B // *AttrValue_Type // *AttrValue_Shape // *AttrValue_Tensor // *AttrValue_List // *AttrValue_Func // *AttrValue_Placeholder Value isAttrValue_Value `protobuf_oneof:"value"` }
Protocol buffer representing the value for an attr used to configure an Op. Comment indicates the corresponding attr type. Only the field matching the attr type may be filled.
func (*AttrValue) Descriptor ¶
func (*AttrValue) GetFunc ¶
func (m *AttrValue) GetFunc() *NameAttrList
func (*AttrValue) GetList ¶
func (m *AttrValue) GetList() *AttrValue_ListValue
func (*AttrValue) GetPlaceholder ¶
func (*AttrValue) GetShape ¶
func (m *AttrValue) GetShape() *TensorShapeProto
func (*AttrValue) GetTensor ¶
func (m *AttrValue) GetTensor() *TensorProto
func (*AttrValue) ProtoMessage ¶
func (*AttrValue) ProtoMessage()
type AttrValue_B ¶
type AttrValue_B struct {
B bool `protobuf:"varint,5,opt,name=b,oneof"`
}
type AttrValue_F ¶
type AttrValue_F struct {
F float32 `protobuf:"fixed32,4,opt,name=f,oneof"`
}
type AttrValue_Func ¶
type AttrValue_Func struct {
Func *NameAttrList `protobuf:"bytes,10,opt,name=func,oneof"`
}
type AttrValue_I ¶
type AttrValue_I struct {
I int64 `protobuf:"varint,3,opt,name=i,oneof"`
}
type AttrValue_List ¶
type AttrValue_List struct {
List *AttrValue_ListValue `protobuf:"bytes,1,opt,name=list,oneof"`
}
type AttrValue_ListValue ¶
type AttrValue_ListValue struct { S [][]byte `protobuf:"bytes,2,rep,name=s,proto3" json:"s,omitempty"` I []int64 `protobuf:"varint,3,rep,packed,name=i" json:"i,omitempty"` F []float32 `protobuf:"fixed32,4,rep,packed,name=f" json:"f,omitempty"` B []bool `protobuf:"varint,5,rep,packed,name=b" json:"b,omitempty"` Type []DataType `protobuf:"varint,6,rep,packed,name=type,enum=tensorflow.DataType" json:"type,omitempty"` Shape []*TensorShapeProto `protobuf:"bytes,7,rep,name=shape" json:"shape,omitempty"` Tensor []*TensorProto `protobuf:"bytes,8,rep,name=tensor" json:"tensor,omitempty"` Func []*NameAttrList `protobuf:"bytes,9,rep,name=func" json:"func,omitempty"` }
LINT.IfChange
func (*AttrValue_ListValue) Descriptor ¶
func (*AttrValue_ListValue) Descriptor() ([]byte, []int)
func (*AttrValue_ListValue) GetB ¶
func (m *AttrValue_ListValue) GetB() []bool
func (*AttrValue_ListValue) GetF ¶
func (m *AttrValue_ListValue) GetF() []float32
func (*AttrValue_ListValue) GetFunc ¶
func (m *AttrValue_ListValue) GetFunc() []*NameAttrList
func (*AttrValue_ListValue) GetI ¶
func (m *AttrValue_ListValue) GetI() []int64
func (*AttrValue_ListValue) GetS ¶
func (m *AttrValue_ListValue) GetS() [][]byte
func (*AttrValue_ListValue) GetShape ¶
func (m *AttrValue_ListValue) GetShape() []*TensorShapeProto
func (*AttrValue_ListValue) GetTensor ¶
func (m *AttrValue_ListValue) GetTensor() []*TensorProto
func (*AttrValue_ListValue) GetType ¶
func (m *AttrValue_ListValue) GetType() []DataType
func (*AttrValue_ListValue) ProtoMessage ¶
func (*AttrValue_ListValue) ProtoMessage()
func (*AttrValue_ListValue) Reset ¶
func (m *AttrValue_ListValue) Reset()
func (*AttrValue_ListValue) String ¶
func (m *AttrValue_ListValue) String() string
type AttrValue_Placeholder ¶
type AttrValue_Placeholder struct {
Placeholder string `protobuf:"bytes,9,opt,name=placeholder,oneof"`
}
type AttrValue_S ¶
type AttrValue_S struct {
S []byte `protobuf:"bytes,2,opt,name=s,proto3,oneof"`
}
type AttrValue_Shape ¶
type AttrValue_Shape struct {
Shape *TensorShapeProto `protobuf:"bytes,7,opt,name=shape,oneof"`
}
type AttrValue_Tensor ¶
type AttrValue_Tensor struct {
Tensor *TensorProto `protobuf:"bytes,8,opt,name=tensor,oneof"`
}
type AttrValue_Type ¶
type AttrValue_Type struct {
Type DataType `protobuf:"varint,6,opt,name=type,enum=tensorflow.DataType,oneof"`
}
type DataType ¶
type DataType int32
LINT.IfChange
const ( // Not a legal value for DataType. Used to indicate a DataType field // has not been set. DataType_DT_INVALID DataType = 0 // Data types that all computation devices are expected to be // capable to support. DataType_DT_FLOAT DataType = 1 DataType_DT_DOUBLE DataType = 2 DataType_DT_INT32 DataType = 3 DataType_DT_UINT8 DataType = 4 DataType_DT_INT16 DataType = 5 DataType_DT_INT8 DataType = 6 DataType_DT_STRING DataType = 7 DataType_DT_COMPLEX64 DataType = 8 DataType_DT_INT64 DataType = 9 DataType_DT_BOOL DataType = 10 DataType_DT_QINT8 DataType = 11 DataType_DT_QUINT8 DataType = 12 DataType_DT_QINT32 DataType = 13 DataType_DT_BFLOAT16 DataType = 14 DataType_DT_QINT16 DataType = 15 DataType_DT_QUINT16 DataType = 16 DataType_DT_UINT16 DataType = 17 DataType_DT_COMPLEX128 DataType = 18 DataType_DT_HALF DataType = 19 DataType_DT_RESOURCE DataType = 20 DataType_DT_VARIANT DataType = 21 // Do not use! These are only for parameters. Every enum above // should have a corresponding value below (verified by types_test). DataType_DT_FLOAT_REF DataType = 101 DataType_DT_DOUBLE_REF DataType = 102 DataType_DT_INT32_REF DataType = 103 DataType_DT_UINT8_REF DataType = 104 DataType_DT_INT16_REF DataType = 105 DataType_DT_INT8_REF DataType = 106 DataType_DT_STRING_REF DataType = 107 DataType_DT_COMPLEX64_REF DataType = 108 DataType_DT_INT64_REF DataType = 109 DataType_DT_BOOL_REF DataType = 110 DataType_DT_QINT8_REF DataType = 111 DataType_DT_QUINT8_REF DataType = 112 DataType_DT_QINT32_REF DataType = 113 DataType_DT_BFLOAT16_REF DataType = 114 DataType_DT_QINT16_REF DataType = 115 DataType_DT_QUINT16_REF DataType = 116 DataType_DT_UINT16_REF DataType = 117 DataType_DT_COMPLEX128_REF DataType = 118 DataType_DT_HALF_REF DataType = 119 DataType_DT_RESOURCE_REF DataType = 120 DataType_DT_VARIANT_REF DataType = 121 )
func (DataType) EnumDescriptor ¶
type FunctionDef ¶
type FunctionDef struct { // The definition of the function's name, arguments, return values, // attrs etc. Signature *OpDef `protobuf:"bytes,1,opt,name=signature" json:"signature,omitempty"` // Attributes specific to this function definition. Attr map[string]*AttrValue `` /* 128-byte string literal not displayed */ // By convention, "op" in node_def is resolved by consulting with a // user-defined library first. If not resolved, "func" is assumed to // be a builtin op. NodeDef []*NodeDef `protobuf:"bytes,3,rep,name=node_def,json=nodeDef" json:"node_def,omitempty"` // A mapping from the output arg names from `signature` to the // outputs from `node_def` that should be returned by the function. Ret map[string]string `` /* 126-byte string literal not displayed */ }
A function can be instantiated when the runtime can bind every attr with a value. When a GraphDef has a call to a function, it must have binding for every attr defined in the signature.
TODO(zhifengc):
- device spec, etc.
func (*FunctionDef) Descriptor ¶
func (*FunctionDef) Descriptor() ([]byte, []int)
func (*FunctionDef) GetAttr ¶
func (m *FunctionDef) GetAttr() map[string]*AttrValue
func (*FunctionDef) GetNodeDef ¶
func (m *FunctionDef) GetNodeDef() []*NodeDef
func (*FunctionDef) GetRet ¶
func (m *FunctionDef) GetRet() map[string]string
func (*FunctionDef) GetSignature ¶
func (m *FunctionDef) GetSignature() *OpDef
func (*FunctionDef) ProtoMessage ¶
func (*FunctionDef) ProtoMessage()
func (*FunctionDef) Reset ¶
func (m *FunctionDef) Reset()
func (*FunctionDef) String ¶
func (m *FunctionDef) String() string
type FunctionDefLibrary ¶
type FunctionDefLibrary struct { Function []*FunctionDef `protobuf:"bytes,1,rep,name=function" json:"function,omitempty"` Gradient []*GradientDef `protobuf:"bytes,2,rep,name=gradient" json:"gradient,omitempty"` }
A library is a set of named functions.
func (*FunctionDefLibrary) Descriptor ¶
func (*FunctionDefLibrary) Descriptor() ([]byte, []int)
func (*FunctionDefLibrary) GetFunction ¶
func (m *FunctionDefLibrary) GetFunction() []*FunctionDef
func (*FunctionDefLibrary) GetGradient ¶
func (m *FunctionDefLibrary) GetGradient() []*GradientDef
func (*FunctionDefLibrary) ProtoMessage ¶
func (*FunctionDefLibrary) ProtoMessage()
func (*FunctionDefLibrary) Reset ¶
func (m *FunctionDefLibrary) Reset()
func (*FunctionDefLibrary) String ¶
func (m *FunctionDefLibrary) String() string
type GradientDef ¶
type GradientDef struct { FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName" json:"function_name,omitempty"` GradientFunc string `protobuf:"bytes,2,opt,name=gradient_func,json=gradientFunc" json:"gradient_func,omitempty"` }
GradientDef defines the gradient function of a function defined in a function library.
A gradient function g (specified by gradient_func) for a function f (specified by function_name) must follow the following:
The function 'f' must be a numerical function which takes N inputs and produces M outputs. Its gradient function 'g', which is a function taking N + M inputs and produces N outputs.
I.e. if we have
(y1, y2, ..., y_M) = f(x1, x2, ..., x_N),
then, g is
(dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N, dL/dy1, dL/dy2, ..., dL/dy_M),
where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the loss function). dL/dx_i is the partial derivative of L with respect to x_i.
func (*GradientDef) Descriptor ¶
func (*GradientDef) Descriptor() ([]byte, []int)
func (*GradientDef) GetFunctionName ¶
func (m *GradientDef) GetFunctionName() string
func (*GradientDef) GetGradientFunc ¶
func (m *GradientDef) GetGradientFunc() string
func (*GradientDef) ProtoMessage ¶
func (*GradientDef) ProtoMessage()
func (*GradientDef) Reset ¶
func (m *GradientDef) Reset()
func (*GradientDef) String ¶
func (m *GradientDef) String() string
type GraphDef ¶
type GraphDef struct { Node []*NodeDef `protobuf:"bytes,1,rep,name=node" json:"node,omitempty"` // Compatibility versions of the graph. See core/public/version.h for version // history. The GraphDef version is distinct from the TensorFlow version, and // each release of TensorFlow will support a range of GraphDef versions. Versions *VersionDef `protobuf:"bytes,4,opt,name=versions" json:"versions,omitempty"` // Deprecated single version field; use versions above instead. Since all // GraphDef changes before "versions" was introduced were forward // compatible, this field is entirely ignored. Version int32 `protobuf:"varint,3,opt,name=version" json:"version,omitempty"` // EXPERIMENTAL. DO NOT USE OR DEPEND ON THIS YET. // // "library" provides user-defined functions. // // Naming: // * library.function.name are in a flat namespace. // NOTE: We may need to change it to be hierarchical to support // different orgs. E.g., // { "/google/nn", { ... }}, // { "/google/vision", { ... }} // { "/org_foo/module_bar", { ... }} // map<string, FunctionDefLib> named_lib; // * If node[i].op is the name of one function in "library", // node[i] is deemed as a function call. Otherwise, node[i].op // must be a primitive operation supported by the runtime. // // // Function call semantics: // // * The callee may start execution as soon as some of its inputs // are ready. The caller may want to use Tuple() mechanism to // ensure all inputs are ready in the same time. // // * The consumer of return values may start executing as soon as // the return values the consumer depends on are ready. The // consumer may want to use Tuple() mechanism to ensure the // consumer does not start until all return values of the callee // function are ready. Library *FunctionDefLibrary `protobuf:"bytes,2,opt,name=library" json:"library,omitempty"` }
Represents the graph of operations
func (*GraphDef) Descriptor ¶
func (*GraphDef) GetLibrary ¶
func (m *GraphDef) GetLibrary() *FunctionDefLibrary
func (*GraphDef) GetVersion ¶
func (*GraphDef) GetVersions ¶
func (m *GraphDef) GetVersions() *VersionDef
func (*GraphDef) ProtoMessage ¶
func (*GraphDef) ProtoMessage()
type NameAttrList ¶
type NameAttrList struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Attr map[string]*AttrValue `` /* 128-byte string literal not displayed */ }
A list of attr names and their values. The whole list is attached with a string name. E.g., MatMul[T=float].
func (*NameAttrList) Descriptor ¶
func (*NameAttrList) Descriptor() ([]byte, []int)
func (*NameAttrList) GetAttr ¶
func (m *NameAttrList) GetAttr() map[string]*AttrValue
func (*NameAttrList) GetName ¶
func (m *NameAttrList) GetName() string
func (*NameAttrList) ProtoMessage ¶
func (*NameAttrList) ProtoMessage()
func (*NameAttrList) Reset ¶
func (m *NameAttrList) Reset()
func (*NameAttrList) String ¶
func (m *NameAttrList) String() string
type NodeDef ¶
type NodeDef struct { // The name given to this operator. Used for naming inputs, // logging, visualization, etc. Unique within a single GraphDef. // Must match the regexp "[A-Za-z0-9.][A-Za-z0-9_./]*". Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // The operation name. There may be custom parameters in attrs. // Op names starting with an underscore are reserved for internal use. Op string `protobuf:"bytes,2,opt,name=op" json:"op,omitempty"` // Each input is "node:src_output" with "node" being a string name and // "src_output" indicating which output tensor to use from "node". If // "src_output" is 0 the ":0" suffix can be omitted. Regular inputs // may optionally be followed by control inputs that have the format // "^node". Input []string `protobuf:"bytes,3,rep,name=input" json:"input,omitempty"` // A (possibly partial) specification for the device on which this // node should be placed. // The expected syntax for this string is as follows: // // DEVICE_SPEC ::= PARTIAL_SPEC // // PARTIAL_SPEC ::= ("/" CONSTRAINT) * // CONSTRAINT ::= ("job:" JOB_NAME) // | ("replica:" [1-9][0-9]*) // | ("task:" [1-9][0-9]*) // | ( ("gpu" | "cpu") ":" ([1-9][0-9]* | "*") ) // // Valid values for this string include: // * "/job:worker/replica:0/task:1/gpu:3" (full specification) // * "/job:worker/gpu:3" (partial specification) // * "" (no specification) // // If the constraints do not resolve to a single device (or if this // field is empty or not present), the runtime will attempt to // choose a device automatically. Device string `protobuf:"bytes,4,opt,name=device" json:"device,omitempty"` // Operation-specific graph-construction-time configuration. // Note that this should include all attrs defined in the // corresponding OpDef, including those with a value matching // the default -- this allows the default to change and makes // NodeDefs easier to interpret on their own. However, if // an attr with a default is not specified in this list, the // default will be used. // The "names" (keys) must match the regexp "[a-z][a-z0-9_]+" (and // one of the names from the corresponding OpDef's attr field). // The values must have a type matching the corresponding OpDef // attr's type field. // TODO(josh11b): Add some examples here showing best practices. Attr map[string]*AttrValue `` /* 128-byte string literal not displayed */ }
func (*NodeDef) Descriptor ¶
func (*NodeDef) ProtoMessage ¶
func (*NodeDef) ProtoMessage()
type OpDef ¶
type OpDef struct { // Op names starting with an underscore are reserved for internal use. // Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9_]*". Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Description of the input(s). InputArg []*OpDef_ArgDef `protobuf:"bytes,2,rep,name=input_arg,json=inputArg" json:"input_arg,omitempty"` // Description of the output(s). OutputArg []*OpDef_ArgDef `protobuf:"bytes,3,rep,name=output_arg,json=outputArg" json:"output_arg,omitempty"` Attr []*OpDef_AttrDef `protobuf:"bytes,4,rep,name=attr" json:"attr,omitempty"` // Optional deprecation based on GraphDef versions. Deprecation *OpDeprecation `protobuf:"bytes,8,opt,name=deprecation" json:"deprecation,omitempty"` // One-line human-readable description of what the Op does. Summary string `protobuf:"bytes,5,opt,name=summary" json:"summary,omitempty"` // Additional, longer human-readable description of what the Op does. Description string `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"` // True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs) IsCommutative bool `protobuf:"varint,18,opt,name=is_commutative,json=isCommutative" json:"is_commutative,omitempty"` // If is_aggregate is true, then this operation accepts N >= 2 // inputs and produces 1 output all of the same type. Should be // associative and commutative, and produce output with the same // shape as the input. The optimizer may replace an aggregate op // taking input from multiple devices with a tree of aggregate ops // that aggregate locally within each device (and possibly within // groups of nearby devices) before communicating. // TODO(josh11b): Implement that optimization. IsAggregate bool `protobuf:"varint,16,opt,name=is_aggregate,json=isAggregate" json:"is_aggregate,omitempty"` // By default Ops may be moved between devices. Stateful ops should // either not be moved, or should only be moved if that state can also // be moved (e.g. via some sort of save / restore). // Stateful ops are guaranteed to never be optimized away by Common // Subexpression Elimination (CSE). IsStateful bool `protobuf:"varint,17,opt,name=is_stateful,json=isStateful" json:"is_stateful,omitempty"` // By default, all inputs to an Op must be initialized Tensors. Ops // that may initialize tensors for the first time should set this // field to true, to allow the Op to take an uninitialized Tensor as // input. AllowsUninitializedInput bool `` /* 130-byte string literal not displayed */ }
Defines an operation. A NodeDef in a GraphDef specifies an Op by using the "op" field which should match the name of a OpDef.
func (*OpDef) Descriptor ¶
func (*OpDef) GetAllowsUninitializedInput ¶
func (*OpDef) GetAttr ¶
func (m *OpDef) GetAttr() []*OpDef_AttrDef
func (*OpDef) GetDeprecation ¶
func (m *OpDef) GetDeprecation() *OpDeprecation
func (*OpDef) GetDescription ¶
func (*OpDef) GetInputArg ¶
func (m *OpDef) GetInputArg() []*OpDef_ArgDef
func (*OpDef) GetIsAggregate ¶
func (*OpDef) GetIsCommutative ¶
func (*OpDef) GetIsStateful ¶
func (*OpDef) GetOutputArg ¶
func (m *OpDef) GetOutputArg() []*OpDef_ArgDef
func (*OpDef) GetSummary ¶
func (*OpDef) ProtoMessage ¶
func (*OpDef) ProtoMessage()
type OpDef_ArgDef ¶
type OpDef_ArgDef struct { // Name for the input/output. Should match the regexp "[a-z][a-z0-9_]*". Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Human readable description. Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` // Describes the type of one or more tensors that are accepted/produced // by this input/output arg. The only legal combinations are: // * For a single tensor: either the "type" field is set or the // "type_attr" field is set to the name of an attr with type "type". // * For a sequence of tensors with the same type: the "number_attr" // field will be set to the name of an attr with type "int", and // either the "type" or "type_attr" field will be set as for // single tensors. // * For a sequence of tensors, the "type_list_attr" field will be set // to the name of an attr with type "list(type)". Type DataType `protobuf:"varint,3,opt,name=type,enum=tensorflow.DataType" json:"type,omitempty"` TypeAttr string `protobuf:"bytes,4,opt,name=type_attr,json=typeAttr" json:"type_attr,omitempty"` NumberAttr string `protobuf:"bytes,5,opt,name=number_attr,json=numberAttr" json:"number_attr,omitempty"` // If specified, attr must have type "list(type)", and none of // type, type_attr, and number_attr may be specified. TypeListAttr string `protobuf:"bytes,6,opt,name=type_list_attr,json=typeListAttr" json:"type_list_attr,omitempty"` // For inputs: if true, the inputs are required to be refs. // By default, inputs can be either refs or non-refs. // For outputs: if true, outputs are refs, otherwise they are not. IsRef bool `protobuf:"varint,16,opt,name=is_ref,json=isRef" json:"is_ref,omitempty"` }
For describing inputs and outputs.
func (*OpDef_ArgDef) Descriptor ¶
func (*OpDef_ArgDef) Descriptor() ([]byte, []int)
func (*OpDef_ArgDef) GetDescription ¶
func (m *OpDef_ArgDef) GetDescription() string
func (*OpDef_ArgDef) GetIsRef ¶
func (m *OpDef_ArgDef) GetIsRef() bool
func (*OpDef_ArgDef) GetName ¶
func (m *OpDef_ArgDef) GetName() string
func (*OpDef_ArgDef) GetNumberAttr ¶
func (m *OpDef_ArgDef) GetNumberAttr() string
func (*OpDef_ArgDef) GetType ¶
func (m *OpDef_ArgDef) GetType() DataType
func (*OpDef_ArgDef) GetTypeAttr ¶
func (m *OpDef_ArgDef) GetTypeAttr() string
func (*OpDef_ArgDef) GetTypeListAttr ¶
func (m *OpDef_ArgDef) GetTypeListAttr() string
func (*OpDef_ArgDef) ProtoMessage ¶
func (*OpDef_ArgDef) ProtoMessage()
func (*OpDef_ArgDef) Reset ¶
func (m *OpDef_ArgDef) Reset()
func (*OpDef_ArgDef) String ¶
func (m *OpDef_ArgDef) String() string
type OpDef_AttrDef ¶
type OpDef_AttrDef struct { // A descriptive name for the argument. May be used, e.g. by the // Python client, as a keyword argument name, and so should match // the regexp "[a-z][a-z0-9_]+". Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // One of the type names from attr_value.proto ("string", "list(string)", // "int", etc.). Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` // A reasonable default for this attribute if the user does not supply // a value. If not specified, the user must supply a value. DefaultValue *AttrValue `protobuf:"bytes,3,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` // Human-readable description. Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` // For type == "int", this is a minimum value. For "list(___)" // types, this is the minimum length. HasMinimum bool `protobuf:"varint,5,opt,name=has_minimum,json=hasMinimum" json:"has_minimum,omitempty"` Minimum int64 `protobuf:"varint,6,opt,name=minimum" json:"minimum,omitempty"` // The set of allowed values. Has type that is the "list" version // of the "type" field above (uses the "list" field of AttrValue). // If type == "type" or "list(type)" above, then the "type" field // of "allowed_values.list" has the set of allowed DataTypes. // If type == "string" or "list(string)", then the "s" field of // "allowed_values.list" has the set of allowed strings. AllowedValues *AttrValue `protobuf:"bytes,7,opt,name=allowed_values,json=allowedValues" json:"allowed_values,omitempty"` }
Description of the graph-construction-time configuration of this Op. That is to say, this describes the attr fields that will be specified in the NodeDef.
func (*OpDef_AttrDef) Descriptor ¶
func (*OpDef_AttrDef) Descriptor() ([]byte, []int)
func (*OpDef_AttrDef) GetAllowedValues ¶
func (m *OpDef_AttrDef) GetAllowedValues() *AttrValue
func (*OpDef_AttrDef) GetDefaultValue ¶
func (m *OpDef_AttrDef) GetDefaultValue() *AttrValue
func (*OpDef_AttrDef) GetDescription ¶
func (m *OpDef_AttrDef) GetDescription() string
func (*OpDef_AttrDef) GetHasMinimum ¶
func (m *OpDef_AttrDef) GetHasMinimum() bool
func (*OpDef_AttrDef) GetMinimum ¶
func (m *OpDef_AttrDef) GetMinimum() int64
func (*OpDef_AttrDef) GetName ¶
func (m *OpDef_AttrDef) GetName() string
func (*OpDef_AttrDef) GetType ¶
func (m *OpDef_AttrDef) GetType() string
func (*OpDef_AttrDef) ProtoMessage ¶
func (*OpDef_AttrDef) ProtoMessage()
func (*OpDef_AttrDef) Reset ¶
func (m *OpDef_AttrDef) Reset()
func (*OpDef_AttrDef) String ¶
func (m *OpDef_AttrDef) String() string
type OpDeprecation ¶
type OpDeprecation struct { // First GraphDef version at which the op is disallowed. Version int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` // Explanation of why it was deprecated and what to use instead. Explanation string `protobuf:"bytes,2,opt,name=explanation" json:"explanation,omitempty"` }
Information about version-dependent deprecation of an op
func (*OpDeprecation) Descriptor ¶
func (*OpDeprecation) Descriptor() ([]byte, []int)
func (*OpDeprecation) GetExplanation ¶
func (m *OpDeprecation) GetExplanation() string
func (*OpDeprecation) GetVersion ¶
func (m *OpDeprecation) GetVersion() int32
func (*OpDeprecation) ProtoMessage ¶
func (*OpDeprecation) ProtoMessage()
func (*OpDeprecation) Reset ¶
func (m *OpDeprecation) Reset()
func (*OpDeprecation) String ¶
func (m *OpDeprecation) String() string
type OpList ¶
type OpList struct {
Op []*OpDef `protobuf:"bytes,1,rep,name=op" json:"op,omitempty"`
}
A collection of OpDefs
func (*OpList) Descriptor ¶
func (*OpList) ProtoMessage ¶
func (*OpList) ProtoMessage()
type ResourceHandleProto ¶
type ResourceHandleProto struct { // Unique name for the device containing the resource. Device string `protobuf:"bytes,1,opt,name=device" json:"device,omitempty"` // Container in which this resource is placed. Container string `protobuf:"bytes,2,opt,name=container" json:"container,omitempty"` // Unique name of this resource. Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` // Hash code for the type of the resource. Is only valid in the same device // and in the same execution. HashCode uint64 `protobuf:"varint,4,opt,name=hash_code,json=hashCode" json:"hash_code,omitempty"` // For debug-only, the name of the type pointed to by this handle, if // available. MaybeTypeName string `protobuf:"bytes,5,opt,name=maybe_type_name,json=maybeTypeName" json:"maybe_type_name,omitempty"` }
Protocol buffer representing a handle to a tensorflow resource. Handles are not valid across executions, but can be serialized back and forth from within a single run.
func (*ResourceHandleProto) Descriptor ¶
func (*ResourceHandleProto) Descriptor() ([]byte, []int)
func (*ResourceHandleProto) GetContainer ¶
func (m *ResourceHandleProto) GetContainer() string
func (*ResourceHandleProto) GetDevice ¶
func (m *ResourceHandleProto) GetDevice() string
func (*ResourceHandleProto) GetHashCode ¶
func (m *ResourceHandleProto) GetHashCode() uint64
func (*ResourceHandleProto) GetMaybeTypeName ¶
func (m *ResourceHandleProto) GetMaybeTypeName() string
func (*ResourceHandleProto) GetName ¶
func (m *ResourceHandleProto) GetName() string
func (*ResourceHandleProto) ProtoMessage ¶
func (*ResourceHandleProto) ProtoMessage()
func (*ResourceHandleProto) Reset ¶
func (m *ResourceHandleProto) Reset()
func (*ResourceHandleProto) String ¶
func (m *ResourceHandleProto) String() string
type TensorProto ¶
type TensorProto struct { Dtype DataType `protobuf:"varint,1,opt,name=dtype,enum=tensorflow.DataType" json:"dtype,omitempty"` // Shape of the tensor. TODO(touts): sort out the 0-rank issues. TensorShape *TensorShapeProto `protobuf:"bytes,2,opt,name=tensor_shape,json=tensorShape" json:"tensor_shape,omitempty"` // Version number. // // In version 0, if the "repeated xxx" representations contain only one // element, that element is repeated to fill the shape. This makes it easy // to represent a constant Tensor with a single value. VersionNumber int32 `protobuf:"varint,3,opt,name=version_number,json=versionNumber" json:"version_number,omitempty"` // Serialized raw tensor content from either Tensor::AsProtoTensorContent or // memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation // can be used for all tensor types. The purpose of this representation is to // reduce serialization overhead during RPC call by avoiding serialization of // many repeated small items. TensorContent []byte `protobuf:"bytes,4,opt,name=tensor_content,json=tensorContent,proto3" json:"tensor_content,omitempty"` // DT_HALF. Note that since protobuf has no int16 type, we'll have some // pointless zero padding for each value here. HalfVal []int32 `protobuf:"varint,13,rep,packed,name=half_val,json=halfVal" json:"half_val,omitempty"` // DT_FLOAT. FloatVal []float32 `protobuf:"fixed32,5,rep,packed,name=float_val,json=floatVal" json:"float_val,omitempty"` // DT_DOUBLE. DoubleVal []float64 `protobuf:"fixed64,6,rep,packed,name=double_val,json=doubleVal" json:"double_val,omitempty"` // DT_INT32, DT_INT16, DT_INT8, DT_UINT8. IntVal []int32 `protobuf:"varint,7,rep,packed,name=int_val,json=intVal" json:"int_val,omitempty"` // DT_STRING StringVal [][]byte `protobuf:"bytes,8,rep,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"` // DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real // and imaginary parts of i-th single precision complex. ScomplexVal []float32 `protobuf:"fixed32,9,rep,packed,name=scomplex_val,json=scomplexVal" json:"scomplex_val,omitempty"` // DT_INT64 Int64Val []int64 `protobuf:"varint,10,rep,packed,name=int64_val,json=int64Val" json:"int64_val,omitempty"` // DT_BOOL BoolVal []bool `protobuf:"varint,11,rep,packed,name=bool_val,json=boolVal" json:"bool_val,omitempty"` // DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real // and imaginary parts of i-th double precision complex. DcomplexVal []float64 `protobuf:"fixed64,12,rep,packed,name=dcomplex_val,json=dcomplexVal" json:"dcomplex_val,omitempty"` // DT_RESOURCE ResourceHandleVal []*ResourceHandleProto `protobuf:"bytes,14,rep,name=resource_handle_val,json=resourceHandleVal" json:"resource_handle_val,omitempty"` // DT_VARIANT VariantVal []*VariantTensorDataProto `protobuf:"bytes,15,rep,name=variant_val,json=variantVal" json:"variant_val,omitempty"` }
Protocol buffer representing a tensor.
func (*TensorProto) Descriptor ¶
func (*TensorProto) Descriptor() ([]byte, []int)
func (*TensorProto) GetBoolVal ¶
func (m *TensorProto) GetBoolVal() []bool
func (*TensorProto) GetDcomplexVal ¶
func (m *TensorProto) GetDcomplexVal() []float64
func (*TensorProto) GetDoubleVal ¶
func (m *TensorProto) GetDoubleVal() []float64
func (*TensorProto) GetDtype ¶
func (m *TensorProto) GetDtype() DataType
func (*TensorProto) GetFloatVal ¶
func (m *TensorProto) GetFloatVal() []float32
func (*TensorProto) GetHalfVal ¶
func (m *TensorProto) GetHalfVal() []int32
func (*TensorProto) GetInt64Val ¶
func (m *TensorProto) GetInt64Val() []int64
func (*TensorProto) GetIntVal ¶
func (m *TensorProto) GetIntVal() []int32
func (*TensorProto) GetResourceHandleVal ¶
func (m *TensorProto) GetResourceHandleVal() []*ResourceHandleProto
func (*TensorProto) GetScomplexVal ¶
func (m *TensorProto) GetScomplexVal() []float32
func (*TensorProto) GetStringVal ¶
func (m *TensorProto) GetStringVal() [][]byte
func (*TensorProto) GetTensorContent ¶
func (m *TensorProto) GetTensorContent() []byte
func (*TensorProto) GetTensorShape ¶
func (m *TensorProto) GetTensorShape() *TensorShapeProto
func (*TensorProto) GetVariantVal ¶
func (m *TensorProto) GetVariantVal() []*VariantTensorDataProto
func (*TensorProto) GetVersionNumber ¶
func (m *TensorProto) GetVersionNumber() int32
func (*TensorProto) ProtoMessage ¶
func (*TensorProto) ProtoMessage()
func (*TensorProto) Reset ¶
func (m *TensorProto) Reset()
func (*TensorProto) String ¶
func (m *TensorProto) String() string
type TensorShapeProto ¶
type TensorShapeProto struct { // Dimensions of the tensor, such as {"input", 30}, {"output", 40} // for a 30 x 40 2D tensor. If an entry has size -1, this // corresponds to a dimension of unknown size. The names are // optional. // // The order of entries in "dim" matters: It indicates the layout of the // values in the tensor in-memory representation. // // The first entry in "dim" is the outermost dimension used to layout the // values, the last entry is the innermost dimension. This matches the // in-memory layout of RowMajor Eigen tensors. // // If "dim.size()" > 0, "unknown_rank" must be false. Dim []*TensorShapeProto_Dim `protobuf:"bytes,2,rep,name=dim" json:"dim,omitempty"` // If true, the number of dimensions in the shape is unknown. // // If true, "dim.size()" must be 0. UnknownRank bool `protobuf:"varint,3,opt,name=unknown_rank,json=unknownRank" json:"unknown_rank,omitempty"` }
Dimensions of a tensor.
func (*TensorShapeProto) Descriptor ¶
func (*TensorShapeProto) Descriptor() ([]byte, []int)
func (*TensorShapeProto) GetDim ¶
func (m *TensorShapeProto) GetDim() []*TensorShapeProto_Dim
func (*TensorShapeProto) GetUnknownRank ¶
func (m *TensorShapeProto) GetUnknownRank() bool
func (*TensorShapeProto) ProtoMessage ¶
func (*TensorShapeProto) ProtoMessage()
func (*TensorShapeProto) Reset ¶
func (m *TensorShapeProto) Reset()
func (*TensorShapeProto) String ¶
func (m *TensorShapeProto) String() string
type TensorShapeProto_Dim ¶
type TensorShapeProto_Dim struct { // Size of the tensor in that dimension. // This value must be >= -1, but values of -1 are reserved for "unknown" // shapes (values of -1 mean "unknown" dimension). Certain wrappers // that work with TensorShapeProto may fail at runtime when deserializing // a TensorShapeProto containing a dim value of -1. Size int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` // Optional name of the tensor dimension. Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` }
One dimension of the tensor.
func (*TensorShapeProto_Dim) Descriptor ¶
func (*TensorShapeProto_Dim) Descriptor() ([]byte, []int)
func (*TensorShapeProto_Dim) GetName ¶
func (m *TensorShapeProto_Dim) GetName() string
func (*TensorShapeProto_Dim) GetSize ¶
func (m *TensorShapeProto_Dim) GetSize() int64
func (*TensorShapeProto_Dim) ProtoMessage ¶
func (*TensorShapeProto_Dim) ProtoMessage()
func (*TensorShapeProto_Dim) Reset ¶
func (m *TensorShapeProto_Dim) Reset()
func (*TensorShapeProto_Dim) String ¶
func (m *TensorShapeProto_Dim) String() string
type VariantTensorDataProto ¶
type VariantTensorDataProto struct { // Name of the type of objects being serialized. TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName" json:"type_name,omitempty"` // Portions of the object that are not Tensors. Metadata []byte `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // Tensors contained within objects being serialized. Tensors []*TensorProto `protobuf:"bytes,3,rep,name=tensors" json:"tensors,omitempty"` }
Protocol buffer representing the serialization format of DT_VARIANT tensors.
func (*VariantTensorDataProto) Descriptor ¶
func (*VariantTensorDataProto) Descriptor() ([]byte, []int)
func (*VariantTensorDataProto) GetMetadata ¶
func (m *VariantTensorDataProto) GetMetadata() []byte
func (*VariantTensorDataProto) GetTensors ¶
func (m *VariantTensorDataProto) GetTensors() []*TensorProto
func (*VariantTensorDataProto) GetTypeName ¶
func (m *VariantTensorDataProto) GetTypeName() string
func (*VariantTensorDataProto) ProtoMessage ¶
func (*VariantTensorDataProto) ProtoMessage()
func (*VariantTensorDataProto) Reset ¶
func (m *VariantTensorDataProto) Reset()
func (*VariantTensorDataProto) String ¶
func (m *VariantTensorDataProto) String() string
type VersionDef ¶
type VersionDef struct { // The version of the code that produced this data. Producer int32 `protobuf:"varint,1,opt,name=producer" json:"producer,omitempty"` // Any consumer below this version is not allowed to consume this data. MinConsumer int32 `protobuf:"varint,2,opt,name=min_consumer,json=minConsumer" json:"min_consumer,omitempty"` // Specific consumer versions which are disallowed (e.g. due to bugs). BadConsumers []int32 `protobuf:"varint,3,rep,packed,name=bad_consumers,json=badConsumers" json:"bad_consumers,omitempty"` }
Version information for a piece of serialized data
There are different types of versions for each type of data (GraphDef, etc.), but they all have the same common shape described here.
Each consumer has "consumer" and "min_producer" versions (specified elsewhere). A consumer is allowed to consume this data if
producer >= min_producer consumer >= min_consumer consumer not in bad_consumers
func (*VersionDef) Descriptor ¶
func (*VersionDef) Descriptor() ([]byte, []int)
func (*VersionDef) GetBadConsumers ¶
func (m *VersionDef) GetBadConsumers() []int32
func (*VersionDef) GetMinConsumer ¶
func (m *VersionDef) GetMinConsumer() int32
func (*VersionDef) GetProducer ¶
func (m *VersionDef) GetProducer() int32
func (*VersionDef) ProtoMessage ¶
func (*VersionDef) ProtoMessage()
func (*VersionDef) Reset ¶
func (m *VersionDef) Reset()
func (*VersionDef) String ¶
func (m *VersionDef) String() string