Documentation ¶
Index ¶
- Variables
- type AssetFileDef
- func (*AssetFileDef) Descriptor() ([]byte, []int)deprecated
- func (x *AssetFileDef) GetFilename() string
- func (x *AssetFileDef) GetTensorInfo() *TensorInfo
- func (*AssetFileDef) ProtoMessage()
- func (x *AssetFileDef) ProtoReflect() protoreflect.Message
- func (x *AssetFileDef) Reset()
- func (x *AssetFileDef) String() string
- type CollectionDef
- func (*CollectionDef) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionDef) GetAnyList() *CollectionDef_AnyList
- func (x *CollectionDef) GetBytesList() *CollectionDef_BytesList
- func (x *CollectionDef) GetFloatList() *CollectionDef_FloatList
- func (x *CollectionDef) GetInt64List() *CollectionDef_Int64List
- func (m *CollectionDef) GetKind() isCollectionDef_Kind
- func (x *CollectionDef) GetNodeList() *CollectionDef_NodeList
- func (*CollectionDef) ProtoMessage()
- func (x *CollectionDef) ProtoReflect() protoreflect.Message
- func (x *CollectionDef) Reset()
- func (x *CollectionDef) String() string
- type CollectionDef_AnyList
- func (*CollectionDef_AnyList) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionDef_AnyList) GetValue() []*anypb.Any
- func (*CollectionDef_AnyList) ProtoMessage()
- func (x *CollectionDef_AnyList) ProtoReflect() protoreflect.Message
- func (x *CollectionDef_AnyList) Reset()
- func (x *CollectionDef_AnyList) String() string
- type CollectionDef_AnyList_
- type CollectionDef_BytesList
- func (*CollectionDef_BytesList) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionDef_BytesList) GetValue() [][]byte
- func (*CollectionDef_BytesList) ProtoMessage()
- func (x *CollectionDef_BytesList) ProtoReflect() protoreflect.Message
- func (x *CollectionDef_BytesList) Reset()
- func (x *CollectionDef_BytesList) String() string
- type CollectionDef_BytesList_
- type CollectionDef_FloatList
- func (*CollectionDef_FloatList) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionDef_FloatList) GetValue() []float32
- func (*CollectionDef_FloatList) ProtoMessage()
- func (x *CollectionDef_FloatList) ProtoReflect() protoreflect.Message
- func (x *CollectionDef_FloatList) Reset()
- func (x *CollectionDef_FloatList) String() string
- type CollectionDef_FloatList_
- type CollectionDef_Int64List
- func (*CollectionDef_Int64List) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionDef_Int64List) GetValue() []int64
- func (*CollectionDef_Int64List) ProtoMessage()
- func (x *CollectionDef_Int64List) ProtoReflect() protoreflect.Message
- func (x *CollectionDef_Int64List) Reset()
- func (x *CollectionDef_Int64List) String() string
- type CollectionDef_Int64List_
- type CollectionDef_NodeList
- func (*CollectionDef_NodeList) Descriptor() ([]byte, []int)deprecated
- func (x *CollectionDef_NodeList) GetValue() []string
- func (*CollectionDef_NodeList) ProtoMessage()
- func (x *CollectionDef_NodeList) ProtoReflect() protoreflect.Message
- func (x *CollectionDef_NodeList) Reset()
- func (x *CollectionDef_NodeList) String() string
- type CollectionDef_NodeList_
- type MetaGraphDef
- func (*MetaGraphDef) Descriptor() ([]byte, []int)deprecated
- func (x *MetaGraphDef) GetAssetFileDef() []*AssetFileDef
- func (x *MetaGraphDef) GetCollectionDef() map[string]*CollectionDef
- func (x *MetaGraphDef) GetGraphDef() *framework.GraphDef
- func (x *MetaGraphDef) GetMetaInfoDef() *MetaGraphDef_MetaInfoDef
- func (x *MetaGraphDef) GetSaverDef() *SaverDef
- func (x *MetaGraphDef) GetSignatureDef() map[string]*SignatureDef
- func (*MetaGraphDef) ProtoMessage()
- func (x *MetaGraphDef) ProtoReflect() protoreflect.Message
- func (x *MetaGraphDef) Reset()
- func (x *MetaGraphDef) String() string
- type MetaGraphDef_MetaInfoDef
- func (*MetaGraphDef_MetaInfoDef) Descriptor() ([]byte, []int)deprecated
- func (x *MetaGraphDef_MetaInfoDef) GetAnyInfo() *anypb.Any
- func (x *MetaGraphDef_MetaInfoDef) GetMetaGraphVersion() string
- func (x *MetaGraphDef_MetaInfoDef) GetStrippedDefaultAttrs() bool
- func (x *MetaGraphDef_MetaInfoDef) GetStrippedOpList() *framework.OpList
- func (x *MetaGraphDef_MetaInfoDef) GetTags() []string
- func (x *MetaGraphDef_MetaInfoDef) GetTensorflowGitVersion() string
- func (x *MetaGraphDef_MetaInfoDef) GetTensorflowVersion() string
- func (*MetaGraphDef_MetaInfoDef) ProtoMessage()
- func (x *MetaGraphDef_MetaInfoDef) ProtoReflect() protoreflect.Message
- func (x *MetaGraphDef_MetaInfoDef) Reset()
- func (x *MetaGraphDef_MetaInfoDef) String() string
- type SavedModel
- func (*SavedModel) Descriptor() ([]byte, []int)deprecated
- func (x *SavedModel) GetMetaGraphs() []*MetaGraphDef
- func (x *SavedModel) GetSavedModelSchemaVersion() int64
- func (*SavedModel) ProtoMessage()
- func (x *SavedModel) ProtoReflect() protoreflect.Message
- func (x *SavedModel) Reset()
- func (x *SavedModel) String() string
- type SaverDef
- func (*SaverDef) Descriptor() ([]byte, []int)deprecated
- func (x *SaverDef) GetFilenameTensorName() string
- func (x *SaverDef) GetKeepCheckpointEveryNHours() float32
- func (x *SaverDef) GetMaxToKeep() int32
- func (x *SaverDef) GetRestoreOpName() string
- func (x *SaverDef) GetSaveTensorName() string
- func (x *SaverDef) GetSharded() bool
- func (x *SaverDef) GetVersion() SaverDef_CheckpointFormatVersion
- func (*SaverDef) ProtoMessage()
- func (x *SaverDef) ProtoReflect() protoreflect.Message
- func (x *SaverDef) Reset()
- func (x *SaverDef) String() string
- type SaverDef_CheckpointFormatVersion
- func (SaverDef_CheckpointFormatVersion) Descriptor() protoreflect.EnumDescriptor
- func (x SaverDef_CheckpointFormatVersion) Enum() *SaverDef_CheckpointFormatVersion
- func (SaverDef_CheckpointFormatVersion) EnumDescriptor() ([]byte, []int)deprecated
- func (x SaverDef_CheckpointFormatVersion) Number() protoreflect.EnumNumber
- func (x SaverDef_CheckpointFormatVersion) String() string
- func (SaverDef_CheckpointFormatVersion) Type() protoreflect.EnumType
- type SignatureDef
- func (*SignatureDef) Descriptor() ([]byte, []int)deprecated
- func (x *SignatureDef) GetInputs() map[string]*TensorInfo
- func (x *SignatureDef) GetMethodName() string
- func (x *SignatureDef) GetOutputs() map[string]*TensorInfo
- func (*SignatureDef) ProtoMessage()
- func (x *SignatureDef) ProtoReflect() protoreflect.Message
- func (x *SignatureDef) Reset()
- func (x *SignatureDef) String() string
- type TensorInfo
- func (*TensorInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TensorInfo) GetCooSparse() *TensorInfo_CooSparse
- func (x *TensorInfo) GetDtype() framework.DataType
- func (m *TensorInfo) GetEncoding() isTensorInfo_Encoding
- func (x *TensorInfo) GetName() string
- func (x *TensorInfo) GetTensorShape() *framework.TensorShapeProto
- func (*TensorInfo) ProtoMessage()
- func (x *TensorInfo) ProtoReflect() protoreflect.Message
- func (x *TensorInfo) Reset()
- func (x *TensorInfo) String() string
- type TensorInfo_CooSparse
- func (*TensorInfo_CooSparse) Descriptor() ([]byte, []int)deprecated
- func (x *TensorInfo_CooSparse) GetDenseShapeTensorName() string
- func (x *TensorInfo_CooSparse) GetIndicesTensorName() string
- func (x *TensorInfo_CooSparse) GetValuesTensorName() string
- func (*TensorInfo_CooSparse) ProtoMessage()
- func (x *TensorInfo_CooSparse) ProtoReflect() protoreflect.Message
- func (x *TensorInfo_CooSparse) Reset()
- func (x *TensorInfo_CooSparse) String() string
- type TensorInfo_CooSparse_
- type TensorInfo_Name
Constants ¶
This section is empty.
Variables ¶
var ( SaverDef_CheckpointFormatVersion_name = map[int32]string{ 0: "LEGACY", 1: "V1", 2: "V2", } SaverDef_CheckpointFormatVersion_value = map[string]int32{ "LEGACY": 0, "V1": 1, "V2": 2, } )
Enum value maps for SaverDef_CheckpointFormatVersion.
var File_tensorflow_core_protobuf_meta_graph_proto protoreflect.FileDescriptor
var File_tensorflow_core_protobuf_saved_model_proto protoreflect.FileDescriptor
var File_tensorflow_core_protobuf_saver_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AssetFileDef ¶
type AssetFileDef struct { // The tensor to bind the asset filename to. TensorInfo *TensorInfo `protobuf:"bytes,1,opt,name=tensor_info,json=tensorInfo,proto3" json:"tensor_info,omitempty"` // The filename within an assets directory. Note: does not include the path // prefix, i.e. directories. For an asset at /tmp/path/vocab.txt, the filename // would be "vocab.txt". Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` // contains filtered or unexported fields }
An asset file def for a single file or a set of sharded files with the same name.
func (*AssetFileDef) Descriptor
deprecated
func (*AssetFileDef) Descriptor() ([]byte, []int)
Deprecated: Use AssetFileDef.ProtoReflect.Descriptor instead.
func (*AssetFileDef) GetFilename ¶
func (x *AssetFileDef) GetFilename() string
func (*AssetFileDef) GetTensorInfo ¶
func (x *AssetFileDef) GetTensorInfo() *TensorInfo
func (*AssetFileDef) ProtoMessage ¶
func (*AssetFileDef) ProtoMessage()
func (*AssetFileDef) ProtoReflect ¶ added in v0.12.0
func (x *AssetFileDef) ProtoReflect() protoreflect.Message
func (*AssetFileDef) Reset ¶
func (x *AssetFileDef) Reset()
func (*AssetFileDef) String ¶
func (x *AssetFileDef) String() string
type CollectionDef ¶
type CollectionDef struct { // Types that are assignable to Kind: // // *CollectionDef_NodeList_ // *CollectionDef_BytesList_ // *CollectionDef_Int64List_ // *CollectionDef_FloatList_ // *CollectionDef_AnyList_ Kind isCollectionDef_Kind `protobuf_oneof:"kind"` // contains filtered or unexported fields }
CollectionDef should cover most collections. To add a user-defined collection, do one of the following:
- For simple data types, such as string, int, float: tf.add_to_collection("your_collection_name", your_simple_value) strings will be stored as bytes_list.
2. For Protobuf types, there are three ways to add them:
tf.add_to_collection("your_collection_name", your_proto.SerializeToString())
collection_def { key: "user_defined_bytes_collection" value { bytes_list { value: "queue_name: \"test_queue\"\n" } } }
or
tf.add_to_collection("your_collection_name", str(your_proto))
collection_def { key: "user_defined_string_collection" value { bytes_list { value: "\n\ntest_queue" } } }
or
any_buf = any_pb2.Any() tf.add_to_collection("your_collection_name", any_buf.Pack(your_proto))
collection_def { key: "user_defined_any_collection" value { any_list { value { type_url: "type.googleapis.com/tensorflow.QueueRunnerDef" value: "\n\ntest_queue" } } } }
For Python objects, implement to_proto() and from_proto(), and register them in the following manner: ops.register_proto_function("your_collection_name", proto_type, to_proto=YourPythonObject.to_proto, from_proto=YourPythonObject.from_proto) These functions will be invoked to serialize and de-serialize the collection. For example, ops.register_proto_function(ops.GraphKeys.GLOBAL_VARIABLES, proto_type=variable_pb2.VariableDef, to_proto=Variable.to_proto, from_proto=Variable.from_proto)
func (*CollectionDef) Descriptor
deprecated
func (*CollectionDef) Descriptor() ([]byte, []int)
Deprecated: Use CollectionDef.ProtoReflect.Descriptor instead.
func (*CollectionDef) GetAnyList ¶
func (x *CollectionDef) GetAnyList() *CollectionDef_AnyList
func (*CollectionDef) GetBytesList ¶
func (x *CollectionDef) GetBytesList() *CollectionDef_BytesList
func (*CollectionDef) GetFloatList ¶
func (x *CollectionDef) GetFloatList() *CollectionDef_FloatList
func (*CollectionDef) GetInt64List ¶
func (x *CollectionDef) GetInt64List() *CollectionDef_Int64List
func (*CollectionDef) GetKind ¶
func (m *CollectionDef) GetKind() isCollectionDef_Kind
func (*CollectionDef) GetNodeList ¶
func (x *CollectionDef) GetNodeList() *CollectionDef_NodeList
func (*CollectionDef) ProtoMessage ¶
func (*CollectionDef) ProtoMessage()
func (*CollectionDef) ProtoReflect ¶ added in v0.12.0
func (x *CollectionDef) ProtoReflect() protoreflect.Message
func (*CollectionDef) Reset ¶
func (x *CollectionDef) Reset()
func (*CollectionDef) String ¶
func (x *CollectionDef) String() string
type CollectionDef_AnyList ¶
type CollectionDef_AnyList struct { Value []*anypb.Any `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
AnyList is used for collecting Any protos.
func (*CollectionDef_AnyList) Descriptor
deprecated
func (*CollectionDef_AnyList) Descriptor() ([]byte, []int)
Deprecated: Use CollectionDef_AnyList.ProtoReflect.Descriptor instead.
func (*CollectionDef_AnyList) GetValue ¶
func (x *CollectionDef_AnyList) GetValue() []*anypb.Any
func (*CollectionDef_AnyList) ProtoMessage ¶
func (*CollectionDef_AnyList) ProtoMessage()
func (*CollectionDef_AnyList) ProtoReflect ¶ added in v0.12.0
func (x *CollectionDef_AnyList) ProtoReflect() protoreflect.Message
func (*CollectionDef_AnyList) Reset ¶
func (x *CollectionDef_AnyList) Reset()
func (*CollectionDef_AnyList) String ¶
func (x *CollectionDef_AnyList) String() string
type CollectionDef_AnyList_ ¶
type CollectionDef_AnyList_ struct {
AnyList *CollectionDef_AnyList `protobuf:"bytes,5,opt,name=any_list,json=anyList,proto3,oneof"`
}
type CollectionDef_BytesList ¶
type CollectionDef_BytesList struct { Value [][]byte `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
BytesList is used for collecting strings and serialized protobufs. For example:
collection_def { key: "trainable_variables" value { bytes_list { value: "\n\017conv1/weights:0\022\024conv1/weights/Assign \032\024conv1/weights/read:0" value: "\n\016conv1/biases:0\022\023conv1/biases/Assign\032 \023conv1/biases/read:0" } } }
func (*CollectionDef_BytesList) Descriptor
deprecated
func (*CollectionDef_BytesList) Descriptor() ([]byte, []int)
Deprecated: Use CollectionDef_BytesList.ProtoReflect.Descriptor instead.
func (*CollectionDef_BytesList) GetValue ¶
func (x *CollectionDef_BytesList) GetValue() [][]byte
func (*CollectionDef_BytesList) ProtoMessage ¶
func (*CollectionDef_BytesList) ProtoMessage()
func (*CollectionDef_BytesList) ProtoReflect ¶ added in v0.12.0
func (x *CollectionDef_BytesList) ProtoReflect() protoreflect.Message
func (*CollectionDef_BytesList) Reset ¶
func (x *CollectionDef_BytesList) Reset()
func (*CollectionDef_BytesList) String ¶
func (x *CollectionDef_BytesList) String() string
type CollectionDef_BytesList_ ¶
type CollectionDef_BytesList_ struct {
BytesList *CollectionDef_BytesList `protobuf:"bytes,2,opt,name=bytes_list,json=bytesList,proto3,oneof"`
}
type CollectionDef_FloatList ¶
type CollectionDef_FloatList struct { Value []float32 `protobuf:"fixed32,1,rep,packed,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
FloatList is used for collecting float values.
func (*CollectionDef_FloatList) Descriptor
deprecated
func (*CollectionDef_FloatList) Descriptor() ([]byte, []int)
Deprecated: Use CollectionDef_FloatList.ProtoReflect.Descriptor instead.
func (*CollectionDef_FloatList) GetValue ¶
func (x *CollectionDef_FloatList) GetValue() []float32
func (*CollectionDef_FloatList) ProtoMessage ¶
func (*CollectionDef_FloatList) ProtoMessage()
func (*CollectionDef_FloatList) ProtoReflect ¶ added in v0.12.0
func (x *CollectionDef_FloatList) ProtoReflect() protoreflect.Message
func (*CollectionDef_FloatList) Reset ¶
func (x *CollectionDef_FloatList) Reset()
func (*CollectionDef_FloatList) String ¶
func (x *CollectionDef_FloatList) String() string
type CollectionDef_FloatList_ ¶
type CollectionDef_FloatList_ struct {
FloatList *CollectionDef_FloatList `protobuf:"bytes,4,opt,name=float_list,json=floatList,proto3,oneof"`
}
type CollectionDef_Int64List ¶
type CollectionDef_Int64List struct { Value []int64 `protobuf:"varint,1,rep,packed,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Int64List is used for collecting int, int64 and long values.
func (*CollectionDef_Int64List) Descriptor
deprecated
func (*CollectionDef_Int64List) Descriptor() ([]byte, []int)
Deprecated: Use CollectionDef_Int64List.ProtoReflect.Descriptor instead.
func (*CollectionDef_Int64List) GetValue ¶
func (x *CollectionDef_Int64List) GetValue() []int64
func (*CollectionDef_Int64List) ProtoMessage ¶
func (*CollectionDef_Int64List) ProtoMessage()
func (*CollectionDef_Int64List) ProtoReflect ¶ added in v0.12.0
func (x *CollectionDef_Int64List) ProtoReflect() protoreflect.Message
func (*CollectionDef_Int64List) Reset ¶
func (x *CollectionDef_Int64List) Reset()
func (*CollectionDef_Int64List) String ¶
func (x *CollectionDef_Int64List) String() string
type CollectionDef_Int64List_ ¶
type CollectionDef_Int64List_ struct {
Int64List *CollectionDef_Int64List `protobuf:"bytes,3,opt,name=int64_list,json=int64List,proto3,oneof"`
}
type CollectionDef_NodeList ¶
type CollectionDef_NodeList struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
NodeList is used for collecting nodes in graph. For example
collection_def { key: "summaries" value { node_list { value: "input_producer/ScalarSummary:0" value: "shuffle_batch/ScalarSummary:0" value: "ImageSummary:0" } }
func (*CollectionDef_NodeList) Descriptor
deprecated
func (*CollectionDef_NodeList) Descriptor() ([]byte, []int)
Deprecated: Use CollectionDef_NodeList.ProtoReflect.Descriptor instead.
func (*CollectionDef_NodeList) GetValue ¶
func (x *CollectionDef_NodeList) GetValue() []string
func (*CollectionDef_NodeList) ProtoMessage ¶
func (*CollectionDef_NodeList) ProtoMessage()
func (*CollectionDef_NodeList) ProtoReflect ¶ added in v0.12.0
func (x *CollectionDef_NodeList) ProtoReflect() protoreflect.Message
func (*CollectionDef_NodeList) Reset ¶
func (x *CollectionDef_NodeList) Reset()
func (*CollectionDef_NodeList) String ¶
func (x *CollectionDef_NodeList) String() string
type CollectionDef_NodeList_ ¶
type CollectionDef_NodeList_ struct {
NodeList *CollectionDef_NodeList `protobuf:"bytes,1,opt,name=node_list,json=nodeList,proto3,oneof"`
}
type MetaGraphDef ¶
type MetaGraphDef struct { MetaInfoDef *MetaGraphDef_MetaInfoDef `protobuf:"bytes,1,opt,name=meta_info_def,json=metaInfoDef,proto3" json:"meta_info_def,omitempty"` // GraphDef. GraphDef *framework.GraphDef `protobuf:"bytes,2,opt,name=graph_def,json=graphDef,proto3" json:"graph_def,omitempty"` // SaverDef. SaverDef *SaverDef `protobuf:"bytes,3,opt,name=saver_def,json=saverDef,proto3" json:"saver_def,omitempty"` // collection_def: Map from collection name to collections. // See CollectionDef section for details. CollectionDef map[string]*CollectionDef `` /* 188-byte string literal not displayed */ // signature_def: Map from user supplied key for a signature to a single // SignatureDef. SignatureDef map[string]*SignatureDef `` /* 185-byte string literal not displayed */ // Asset file def to be used with the defined graph. AssetFileDef []*AssetFileDef `protobuf:"bytes,6,rep,name=asset_file_def,json=assetFileDef,proto3" json:"asset_file_def,omitempty"` // contains filtered or unexported fields }
NOTE: This protocol buffer is evolving, and will go through revisions in the coming months.
Protocol buffer containing the following which are necessary to restart training, run inference. It can be used to serialize/de-serialize memory objects necessary for running computation in a graph when crossing the process boundary. It can be used for long term storage of graphs, cross-language execution of graphs, etc.
MetaInfoDef GraphDef SaverDef CollectionDef TensorInfo SignatureDef
func (*MetaGraphDef) Descriptor
deprecated
func (*MetaGraphDef) Descriptor() ([]byte, []int)
Deprecated: Use MetaGraphDef.ProtoReflect.Descriptor instead.
func (*MetaGraphDef) GetAssetFileDef ¶
func (x *MetaGraphDef) GetAssetFileDef() []*AssetFileDef
func (*MetaGraphDef) GetCollectionDef ¶
func (x *MetaGraphDef) GetCollectionDef() map[string]*CollectionDef
func (*MetaGraphDef) GetGraphDef ¶
func (x *MetaGraphDef) GetGraphDef() *framework.GraphDef
func (*MetaGraphDef) GetMetaInfoDef ¶
func (x *MetaGraphDef) GetMetaInfoDef() *MetaGraphDef_MetaInfoDef
func (*MetaGraphDef) GetSaverDef ¶
func (x *MetaGraphDef) GetSaverDef() *SaverDef
func (*MetaGraphDef) GetSignatureDef ¶
func (x *MetaGraphDef) GetSignatureDef() map[string]*SignatureDef
func (*MetaGraphDef) ProtoMessage ¶
func (*MetaGraphDef) ProtoMessage()
func (*MetaGraphDef) ProtoReflect ¶ added in v0.12.0
func (x *MetaGraphDef) ProtoReflect() protoreflect.Message
func (*MetaGraphDef) Reset ¶
func (x *MetaGraphDef) Reset()
func (*MetaGraphDef) String ¶
func (x *MetaGraphDef) String() string
type MetaGraphDef_MetaInfoDef ¶
type MetaGraphDef_MetaInfoDef struct { // User specified Version string. Can be the name of the model and revision, // steps this model has been trained to, etc. MetaGraphVersion string `protobuf:"bytes,1,opt,name=meta_graph_version,json=metaGraphVersion,proto3" json:"meta_graph_version,omitempty"` // A copy of the OpDefs used by the producer of this graph_def. // Descriptions and Ops not used in graph_def are stripped out. StrippedOpList *framework.OpList `protobuf:"bytes,2,opt,name=stripped_op_list,json=strippedOpList,proto3" json:"stripped_op_list,omitempty"` // A serialized protobuf. Can be the time this meta graph is created, or // modified, or name of the model. AnyInfo *anypb.Any `protobuf:"bytes,3,opt,name=any_info,json=anyInfo,proto3" json:"any_info,omitempty"` // User supplied tag(s) on the meta_graph and included graph_def. // // MetaGraphDefs should be tagged with their capabilities or use-cases. // Examples: "train", "serve", "gpu", "tpu", etc. // These tags enable loaders to access the MetaGraph(s) appropriate for a // specific use-case or runtime environment. Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` // The __version__ string of the tensorflow build used to write this graph. // This will be populated by the framework, which will overwrite any user // supplied value. TensorflowVersion string `protobuf:"bytes,5,opt,name=tensorflow_version,json=tensorflowVersion,proto3" json:"tensorflow_version,omitempty"` // The __git_version__ string of the tensorflow build used to write this // graph. This will be populated by the framework, which will overwrite any // user supplied value. TensorflowGitVersion string `protobuf:"bytes,6,opt,name=tensorflow_git_version,json=tensorflowGitVersion,proto3" json:"tensorflow_git_version,omitempty"` // A flag to denote whether default-valued attrs have been stripped from // the nodes in this graph_def. StrippedDefaultAttrs bool `protobuf:"varint,7,opt,name=stripped_default_attrs,json=strippedDefaultAttrs,proto3" json:"stripped_default_attrs,omitempty"` // contains filtered or unexported fields }
Meta information regarding the graph to be exported. To be used by users of this protocol buffer to encode information regarding their meta graph.
func (*MetaGraphDef_MetaInfoDef) Descriptor
deprecated
func (*MetaGraphDef_MetaInfoDef) Descriptor() ([]byte, []int)
Deprecated: Use MetaGraphDef_MetaInfoDef.ProtoReflect.Descriptor instead.
func (*MetaGraphDef_MetaInfoDef) GetAnyInfo ¶
func (x *MetaGraphDef_MetaInfoDef) GetAnyInfo() *anypb.Any
func (*MetaGraphDef_MetaInfoDef) GetMetaGraphVersion ¶
func (x *MetaGraphDef_MetaInfoDef) GetMetaGraphVersion() string
func (*MetaGraphDef_MetaInfoDef) GetStrippedDefaultAttrs ¶
func (x *MetaGraphDef_MetaInfoDef) GetStrippedDefaultAttrs() bool
func (*MetaGraphDef_MetaInfoDef) GetStrippedOpList ¶
func (x *MetaGraphDef_MetaInfoDef) GetStrippedOpList() *framework.OpList
func (*MetaGraphDef_MetaInfoDef) GetTags ¶
func (x *MetaGraphDef_MetaInfoDef) GetTags() []string
func (*MetaGraphDef_MetaInfoDef) GetTensorflowGitVersion ¶
func (x *MetaGraphDef_MetaInfoDef) GetTensorflowGitVersion() string
func (*MetaGraphDef_MetaInfoDef) GetTensorflowVersion ¶
func (x *MetaGraphDef_MetaInfoDef) GetTensorflowVersion() string
func (*MetaGraphDef_MetaInfoDef) ProtoMessage ¶
func (*MetaGraphDef_MetaInfoDef) ProtoMessage()
func (*MetaGraphDef_MetaInfoDef) ProtoReflect ¶ added in v0.12.0
func (x *MetaGraphDef_MetaInfoDef) ProtoReflect() protoreflect.Message
func (*MetaGraphDef_MetaInfoDef) Reset ¶
func (x *MetaGraphDef_MetaInfoDef) Reset()
func (*MetaGraphDef_MetaInfoDef) String ¶
func (x *MetaGraphDef_MetaInfoDef) String() string
type SavedModel ¶
type SavedModel struct { // The schema version of the SavedModel instance. Used for versioning when // making future changes to the specification/implementation. Initial value // at release will be 1. SavedModelSchemaVersion int64 `` /* 135-byte string literal not displayed */ // One or more MetaGraphs. MetaGraphs []*MetaGraphDef `protobuf:"bytes,2,rep,name=meta_graphs,json=metaGraphs,proto3" json:"meta_graphs,omitempty"` // contains filtered or unexported fields }
SavedModel is the high level serialization format for TensorFlow Models. See [todo: doc links, similar to session_bundle] for more information.
func (*SavedModel) Descriptor
deprecated
func (*SavedModel) Descriptor() ([]byte, []int)
Deprecated: Use SavedModel.ProtoReflect.Descriptor instead.
func (*SavedModel) GetMetaGraphs ¶
func (x *SavedModel) GetMetaGraphs() []*MetaGraphDef
func (*SavedModel) GetSavedModelSchemaVersion ¶
func (x *SavedModel) GetSavedModelSchemaVersion() int64
func (*SavedModel) ProtoMessage ¶
func (*SavedModel) ProtoMessage()
func (*SavedModel) ProtoReflect ¶ added in v0.12.0
func (x *SavedModel) ProtoReflect() protoreflect.Message
func (*SavedModel) Reset ¶
func (x *SavedModel) Reset()
func (*SavedModel) String ¶
func (x *SavedModel) String() string
type SaverDef ¶
type SaverDef struct { // The name of the tensor in which to specify the filename when saving or // restoring a model checkpoint. FilenameTensorName string `protobuf:"bytes,1,opt,name=filename_tensor_name,json=filenameTensorName,proto3" json:"filename_tensor_name,omitempty"` // The operation to run when saving a model checkpoint. SaveTensorName string `protobuf:"bytes,2,opt,name=save_tensor_name,json=saveTensorName,proto3" json:"save_tensor_name,omitempty"` // The operation to run when restoring a model checkpoint. RestoreOpName string `protobuf:"bytes,3,opt,name=restore_op_name,json=restoreOpName,proto3" json:"restore_op_name,omitempty"` // Maximum number of checkpoints to keep. If 0, no checkpoints are deleted. MaxToKeep int32 `protobuf:"varint,4,opt,name=max_to_keep,json=maxToKeep,proto3" json:"max_to_keep,omitempty"` // Shard the save files, one per device that has Variable nodes. Sharded bool `protobuf:"varint,5,opt,name=sharded,proto3" json:"sharded,omitempty"` // How often to keep an additional checkpoint. If not specified, only the last // "max_to_keep" checkpoints are kept; if specified, in addition to keeping // the last "max_to_keep" checkpoints, an additional checkpoint will be kept // for every n hours of training. KeepCheckpointEveryNHours float32 `` /* 144-byte string literal not displayed */ Version SaverDef_CheckpointFormatVersion `protobuf:"varint,7,opt,name=version,proto3,enum=tensorflow.SaverDef_CheckpointFormatVersion" json:"version,omitempty"` // contains filtered or unexported fields }
Protocol buffer representing the configuration of a Saver.
func (*SaverDef) Descriptor
deprecated
func (*SaverDef) GetFilenameTensorName ¶
func (*SaverDef) GetKeepCheckpointEveryNHours ¶
func (*SaverDef) GetMaxToKeep ¶
func (*SaverDef) GetRestoreOpName ¶
func (*SaverDef) GetSaveTensorName ¶
func (*SaverDef) GetSharded ¶
func (*SaverDef) GetVersion ¶
func (x *SaverDef) GetVersion() SaverDef_CheckpointFormatVersion
func (*SaverDef) ProtoMessage ¶
func (*SaverDef) ProtoMessage()
func (*SaverDef) ProtoReflect ¶ added in v0.12.0
func (x *SaverDef) ProtoReflect() protoreflect.Message
type SaverDef_CheckpointFormatVersion ¶
type SaverDef_CheckpointFormatVersion int32
A version number that identifies a different on-disk checkpoint format. Usually, each subclass of BaseSaverBuilder works with a particular version/format. However, it is possible that the same builder may be upgraded to support a newer checkpoint format in the future.
const ( // Internal legacy format. SaverDef_LEGACY SaverDef_CheckpointFormatVersion = 0 // Deprecated format: tf.Saver() which works with tensorflow::table::Table. SaverDef_V1 SaverDef_CheckpointFormatVersion = 1 // Current format: more efficient. SaverDef_V2 SaverDef_CheckpointFormatVersion = 2 )
func (SaverDef_CheckpointFormatVersion) Descriptor ¶ added in v0.12.0
func (SaverDef_CheckpointFormatVersion) Descriptor() protoreflect.EnumDescriptor
func (SaverDef_CheckpointFormatVersion) Enum ¶ added in v0.12.0
func (x SaverDef_CheckpointFormatVersion) Enum() *SaverDef_CheckpointFormatVersion
func (SaverDef_CheckpointFormatVersion) EnumDescriptor
deprecated
func (SaverDef_CheckpointFormatVersion) EnumDescriptor() ([]byte, []int)
Deprecated: Use SaverDef_CheckpointFormatVersion.Descriptor instead.
func (SaverDef_CheckpointFormatVersion) Number ¶ added in v0.12.0
func (x SaverDef_CheckpointFormatVersion) Number() protoreflect.EnumNumber
func (SaverDef_CheckpointFormatVersion) String ¶
func (x SaverDef_CheckpointFormatVersion) String() string
func (SaverDef_CheckpointFormatVersion) Type ¶ added in v0.12.0
func (SaverDef_CheckpointFormatVersion) Type() protoreflect.EnumType
type SignatureDef ¶
type SignatureDef struct { // Named input parameters. Inputs map[string]*TensorInfo `` /* 153-byte string literal not displayed */ // Named output parameters. Outputs map[string]*TensorInfo `` /* 155-byte string literal not displayed */ // Extensible method_name information enabling third-party users to mark a // SignatureDef as supporting a particular method. This enables producers and // consumers of SignatureDefs, e.g. a model definition library and a serving // library to have a clear hand-off regarding the semantics of a computation. // // Note that multiple SignatureDefs in a single MetaGraphDef may have the same // method_name. This is commonly used to support multi-headed computation, // where a single graph computation may return multiple results. MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // contains filtered or unexported fields }
SignatureDef defines the signature of a computation supported by a TensorFlow graph.
For example, a model with two loss computations, sharing a single input, might have the following signature_def map.
Note that across the two SignatureDefs "loss_A" and "loss_B", the input key, output key, and method_name are identical, and will be used by system(s) that implement or rely upon this particular loss method. The output tensor names differ, demonstrating how different outputs can exist for the same method.
signature_def { key: "loss_A" value { inputs { key: "input" value { name: "input:0" dtype: DT_STRING tensor_shape: ... } } outputs { key: "loss_output" value { name: "loss_output_A:0" dtype: DT_FLOAT tensor_shape: ... } } } ... method_name: "some/package/compute_loss" } signature_def { key: "loss_B" value { inputs { key: "input" value { name: "input:0" dtype: DT_STRING tensor_shape: ... } } outputs { key: "loss_output" value { name: "loss_output_B:0" dtype: DT_FLOAT tensor_shape: ... } } } ... method_name: "some/package/compute_loss" }
func (*SignatureDef) Descriptor
deprecated
func (*SignatureDef) Descriptor() ([]byte, []int)
Deprecated: Use SignatureDef.ProtoReflect.Descriptor instead.
func (*SignatureDef) GetInputs ¶
func (x *SignatureDef) GetInputs() map[string]*TensorInfo
func (*SignatureDef) GetMethodName ¶
func (x *SignatureDef) GetMethodName() string
func (*SignatureDef) GetOutputs ¶
func (x *SignatureDef) GetOutputs() map[string]*TensorInfo
func (*SignatureDef) ProtoMessage ¶
func (*SignatureDef) ProtoMessage()
func (*SignatureDef) ProtoReflect ¶ added in v0.12.0
func (x *SignatureDef) ProtoReflect() protoreflect.Message
func (*SignatureDef) Reset ¶
func (x *SignatureDef) Reset()
func (*SignatureDef) String ¶
func (x *SignatureDef) String() string
type TensorInfo ¶
type TensorInfo struct { // Types that are assignable to Encoding: // // *TensorInfo_Name // *TensorInfo_CooSparse_ Encoding isTensorInfo_Encoding `protobuf_oneof:"encoding"` Dtype framework.DataType `protobuf:"varint,2,opt,name=dtype,proto3,enum=tensorflow.DataType" json:"dtype,omitempty"` // The static shape should be recorded here, to the extent that it can // be known in advance. In the case of a SparseTensor, this field describes // the logical shape of the represented tensor (aka dense_shape). TensorShape *framework.TensorShapeProto `protobuf:"bytes,3,opt,name=tensor_shape,json=tensorShape,proto3" json:"tensor_shape,omitempty"` // contains filtered or unexported fields }
Information about a Tensor necessary for feeding or retrieval.
func (*TensorInfo) Descriptor
deprecated
func (*TensorInfo) Descriptor() ([]byte, []int)
Deprecated: Use TensorInfo.ProtoReflect.Descriptor instead.
func (*TensorInfo) GetCooSparse ¶
func (x *TensorInfo) GetCooSparse() *TensorInfo_CooSparse
func (*TensorInfo) GetDtype ¶
func (x *TensorInfo) GetDtype() framework.DataType
func (*TensorInfo) GetEncoding ¶
func (m *TensorInfo) GetEncoding() isTensorInfo_Encoding
func (*TensorInfo) GetName ¶
func (x *TensorInfo) GetName() string
func (*TensorInfo) GetTensorShape ¶
func (x *TensorInfo) GetTensorShape() *framework.TensorShapeProto
func (*TensorInfo) ProtoMessage ¶
func (*TensorInfo) ProtoMessage()
func (*TensorInfo) ProtoReflect ¶ added in v0.12.0
func (x *TensorInfo) ProtoReflect() protoreflect.Message
func (*TensorInfo) Reset ¶
func (x *TensorInfo) Reset()
func (*TensorInfo) String ¶
func (x *TensorInfo) String() string
type TensorInfo_CooSparse ¶
type TensorInfo_CooSparse struct { // The shape of the values Tensor is [?]. Its dtype must be the dtype of // the SparseTensor as a whole, given in the enclosing TensorInfo. ValuesTensorName string `protobuf:"bytes,1,opt,name=values_tensor_name,json=valuesTensorName,proto3" json:"values_tensor_name,omitempty"` // The indices Tensor must have dtype int64 and shape [?, ?]. IndicesTensorName string `protobuf:"bytes,2,opt,name=indices_tensor_name,json=indicesTensorName,proto3" json:"indices_tensor_name,omitempty"` // The dynamic logical shape represented by the SparseTensor is recorded in // the Tensor referenced here. It must have dtype int64 and shape [?]. DenseShapeTensorName string `protobuf:"bytes,3,opt,name=dense_shape_tensor_name,json=denseShapeTensorName,proto3" json:"dense_shape_tensor_name,omitempty"` // contains filtered or unexported fields }
For sparse tensors, The COO encoding stores a triple of values, indices, and shape.
func (*TensorInfo_CooSparse) Descriptor
deprecated
func (*TensorInfo_CooSparse) Descriptor() ([]byte, []int)
Deprecated: Use TensorInfo_CooSparse.ProtoReflect.Descriptor instead.
func (*TensorInfo_CooSparse) GetDenseShapeTensorName ¶
func (x *TensorInfo_CooSparse) GetDenseShapeTensorName() string
func (*TensorInfo_CooSparse) GetIndicesTensorName ¶
func (x *TensorInfo_CooSparse) GetIndicesTensorName() string
func (*TensorInfo_CooSparse) GetValuesTensorName ¶
func (x *TensorInfo_CooSparse) GetValuesTensorName() string
func (*TensorInfo_CooSparse) ProtoMessage ¶
func (*TensorInfo_CooSparse) ProtoMessage()
func (*TensorInfo_CooSparse) ProtoReflect ¶ added in v0.12.0
func (x *TensorInfo_CooSparse) ProtoReflect() protoreflect.Message
func (*TensorInfo_CooSparse) Reset ¶
func (x *TensorInfo_CooSparse) Reset()
func (*TensorInfo_CooSparse) String ¶
func (x *TensorInfo_CooSparse) String() string
type TensorInfo_CooSparse_ ¶
type TensorInfo_CooSparse_ struct { // There are many possible encodings of sparse matrices // (https://en.wikipedia.org/wiki/Sparse_matrix). Currently, TensorFlow // uses only the COO encoding. This is supported and documented in the // SparseTensor Python class. CooSparse *TensorInfo_CooSparse `protobuf:"bytes,4,opt,name=coo_sparse,json=cooSparse,proto3,oneof"` }
type TensorInfo_Name ¶
type TensorInfo_Name struct { // For dense `Tensor`s, the name of the tensor in the graph. Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"` }