Documentation ¶
Overview ¶
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/protobuf/meta_graph.proto
It has these top-level messages:
MetaGraphDef CollectionDef TensorInfo SignatureDef AssetFileDef
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/protobuf/saved_model.proto
It has these top-level messages:
SavedModel
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
tensorflow/core/protobuf/saver.proto
It has these top-level messages:
SaverDef
Index ¶
- Variables
- type AssetFileDef
- type CollectionDef
- func (*CollectionDef) Descriptor() ([]byte, []int)
- func (m *CollectionDef) GetAnyList() *CollectionDef_AnyList
- func (m *CollectionDef) GetBytesList() *CollectionDef_BytesList
- func (m *CollectionDef) GetFloatList() *CollectionDef_FloatList
- func (m *CollectionDef) GetInt64List() *CollectionDef_Int64List
- func (m *CollectionDef) GetKind() isCollectionDef_Kind
- func (m *CollectionDef) GetNodeList() *CollectionDef_NodeList
- func (*CollectionDef) ProtoMessage()
- func (m *CollectionDef) Reset()
- func (m *CollectionDef) String() string
- func (*CollectionDef) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type CollectionDef_AnyList
- type CollectionDef_AnyList_
- type CollectionDef_BytesList
- type CollectionDef_BytesList_
- type CollectionDef_FloatList
- type CollectionDef_FloatList_
- type CollectionDef_Int64List
- type CollectionDef_Int64List_
- type CollectionDef_NodeList
- type CollectionDef_NodeList_
- type MetaGraphDef
- func (*MetaGraphDef) Descriptor() ([]byte, []int)
- func (m *MetaGraphDef) GetAssetFileDef() []*AssetFileDef
- func (m *MetaGraphDef) GetCollectionDef() map[string]*CollectionDef
- func (m *MetaGraphDef) GetGraphDef() *tffw.GraphDef
- func (m *MetaGraphDef) GetMetaInfoDef() *MetaGraphDef_MetaInfoDef
- func (m *MetaGraphDef) GetSaverDef() *SaverDef
- func (m *MetaGraphDef) GetSignatureDef() map[string]*SignatureDef
- func (*MetaGraphDef) ProtoMessage()
- func (m *MetaGraphDef) Reset()
- func (m *MetaGraphDef) String() string
- type MetaGraphDef_MetaInfoDef
- func (*MetaGraphDef_MetaInfoDef) Descriptor() ([]byte, []int)
- func (m *MetaGraphDef_MetaInfoDef) GetAnyInfo() *google_protobuf.Any
- func (m *MetaGraphDef_MetaInfoDef) GetMetaGraphVersion() string
- func (m *MetaGraphDef_MetaInfoDef) GetStrippedOpList() *tffw.OpList
- func (m *MetaGraphDef_MetaInfoDef) GetTags() []string
- func (m *MetaGraphDef_MetaInfoDef) GetTensorflowGitVersion() string
- func (m *MetaGraphDef_MetaInfoDef) GetTensorflowVersion() string
- func (*MetaGraphDef_MetaInfoDef) ProtoMessage()
- func (m *MetaGraphDef_MetaInfoDef) Reset()
- func (m *MetaGraphDef_MetaInfoDef) String() string
- type SavedModel
- type SaverDef
- func (*SaverDef) Descriptor() ([]byte, []int)
- func (m *SaverDef) GetFilenameTensorName() string
- func (m *SaverDef) GetKeepCheckpointEveryNHours() float32
- func (m *SaverDef) GetMaxToKeep() int32
- func (m *SaverDef) GetRestoreOpName() string
- func (m *SaverDef) GetSaveTensorName() string
- func (m *SaverDef) GetSharded() bool
- func (m *SaverDef) GetVersion() SaverDef_CheckpointFormatVersion
- func (*SaverDef) ProtoMessage()
- func (m *SaverDef) Reset()
- func (m *SaverDef) String() string
- type SaverDef_CheckpointFormatVersion
- type SignatureDef
- func (*SignatureDef) Descriptor() ([]byte, []int)
- func (m *SignatureDef) GetInputs() map[string]*TensorInfo
- func (m *SignatureDef) GetMethodName() string
- func (m *SignatureDef) GetOutputs() map[string]*TensorInfo
- func (*SignatureDef) ProtoMessage()
- func (m *SignatureDef) Reset()
- func (m *SignatureDef) String() string
- type TensorInfo
- func (*TensorInfo) Descriptor() ([]byte, []int)
- func (m *TensorInfo) GetCooSparse() *TensorInfo_CooSparse
- func (m *TensorInfo) GetDtype() tffw.DataType
- func (m *TensorInfo) GetEncoding() isTensorInfo_Encoding
- func (m *TensorInfo) GetName() string
- func (m *TensorInfo) GetTensorShape() *tffw.TensorShapeProto
- func (*TensorInfo) ProtoMessage()
- func (m *TensorInfo) Reset()
- func (m *TensorInfo) String() string
- func (*TensorInfo) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type TensorInfo_CooSparse
- func (*TensorInfo_CooSparse) Descriptor() ([]byte, []int)
- func (m *TensorInfo_CooSparse) GetDenseShapeTensorName() string
- func (m *TensorInfo_CooSparse) GetIndicesTensorName() string
- func (m *TensorInfo_CooSparse) GetValuesTensorName() string
- func (*TensorInfo_CooSparse) ProtoMessage()
- func (m *TensorInfo_CooSparse) Reset()
- func (m *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",
}
var SaverDef_CheckpointFormatVersion_value = map[string]int32{
"LEGACY": 0,
"V1": 1,
"V2": 2,
}
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" 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" json:"filename,omitempty"` }
An asset file def for a single file or a set of sharded files with the same name.
func (*AssetFileDef) Descriptor ¶
func (*AssetFileDef) Descriptor() ([]byte, []int)
func (*AssetFileDef) GetFilename ¶
func (m *AssetFileDef) GetFilename() string
func (*AssetFileDef) GetTensorInfo ¶
func (m *AssetFileDef) GetTensorInfo() *TensorInfo
func (*AssetFileDef) ProtoMessage ¶
func (*AssetFileDef) ProtoMessage()
func (*AssetFileDef) Reset ¶
func (m *AssetFileDef) Reset()
func (*AssetFileDef) String ¶
func (m *AssetFileDef) String() string
type CollectionDef ¶
type CollectionDef struct { // Types that are valid to be assigned to Kind: // *CollectionDef_NodeList_ // *CollectionDef_BytesList_ // *CollectionDef_Int64List_ // *CollectionDef_FloatList_ // *CollectionDef_AnyList_ Kind isCollectionDef_Kind `protobuf_oneof:"kind"` }
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 ¶
func (*CollectionDef) Descriptor() ([]byte, []int)
func (*CollectionDef) GetAnyList ¶
func (m *CollectionDef) GetAnyList() *CollectionDef_AnyList
func (*CollectionDef) GetBytesList ¶
func (m *CollectionDef) GetBytesList() *CollectionDef_BytesList
func (*CollectionDef) GetFloatList ¶
func (m *CollectionDef) GetFloatList() *CollectionDef_FloatList
func (*CollectionDef) GetInt64List ¶
func (m *CollectionDef) GetInt64List() *CollectionDef_Int64List
func (*CollectionDef) GetKind ¶
func (m *CollectionDef) GetKind() isCollectionDef_Kind
func (*CollectionDef) GetNodeList ¶
func (m *CollectionDef) GetNodeList() *CollectionDef_NodeList
func (*CollectionDef) ProtoMessage ¶
func (*CollectionDef) ProtoMessage()
func (*CollectionDef) Reset ¶
func (m *CollectionDef) Reset()
func (*CollectionDef) String ¶
func (m *CollectionDef) String() string
func (*CollectionDef) XXX_OneofFuncs ¶
func (*CollectionDef) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type CollectionDef_AnyList ¶
type CollectionDef_AnyList struct {
Value []*google_protobuf.Any `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
}
AnyList is used for collecting Any protos.
func (*CollectionDef_AnyList) Descriptor ¶
func (*CollectionDef_AnyList) Descriptor() ([]byte, []int)
func (*CollectionDef_AnyList) GetValue ¶
func (m *CollectionDef_AnyList) GetValue() []*google_protobuf.Any
func (*CollectionDef_AnyList) ProtoMessage ¶
func (*CollectionDef_AnyList) ProtoMessage()
func (*CollectionDef_AnyList) Reset ¶
func (m *CollectionDef_AnyList) Reset()
func (*CollectionDef_AnyList) String ¶
func (m *CollectionDef_AnyList) String() string
type CollectionDef_AnyList_ ¶
type CollectionDef_AnyList_ struct {
AnyList *CollectionDef_AnyList `protobuf:"bytes,5,opt,name=any_list,json=anyList,oneof"`
}
type CollectionDef_BytesList ¶
type CollectionDef_BytesList struct {
Value [][]byte `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
}
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 ¶
func (*CollectionDef_BytesList) Descriptor() ([]byte, []int)
func (*CollectionDef_BytesList) GetValue ¶
func (m *CollectionDef_BytesList) GetValue() [][]byte
func (*CollectionDef_BytesList) ProtoMessage ¶
func (*CollectionDef_BytesList) ProtoMessage()
func (*CollectionDef_BytesList) Reset ¶
func (m *CollectionDef_BytesList) Reset()
func (*CollectionDef_BytesList) String ¶
func (m *CollectionDef_BytesList) String() string
type CollectionDef_BytesList_ ¶
type CollectionDef_BytesList_ struct {
BytesList *CollectionDef_BytesList `protobuf:"bytes,2,opt,name=bytes_list,json=bytesList,oneof"`
}
type CollectionDef_FloatList ¶
type CollectionDef_FloatList struct {
Value []float32 `protobuf:"fixed32,1,rep,packed,name=value" json:"value,omitempty"`
}
FloatList is used for collecting float values.
func (*CollectionDef_FloatList) Descriptor ¶
func (*CollectionDef_FloatList) Descriptor() ([]byte, []int)
func (*CollectionDef_FloatList) GetValue ¶
func (m *CollectionDef_FloatList) GetValue() []float32
func (*CollectionDef_FloatList) ProtoMessage ¶
func (*CollectionDef_FloatList) ProtoMessage()
func (*CollectionDef_FloatList) Reset ¶
func (m *CollectionDef_FloatList) Reset()
func (*CollectionDef_FloatList) String ¶
func (m *CollectionDef_FloatList) String() string
type CollectionDef_FloatList_ ¶
type CollectionDef_FloatList_ struct {
FloatList *CollectionDef_FloatList `protobuf:"bytes,4,opt,name=float_list,json=floatList,oneof"`
}
type CollectionDef_Int64List ¶
type CollectionDef_Int64List struct {
Value []int64 `protobuf:"varint,1,rep,packed,name=value" json:"value,omitempty"`
}
Int64List is used for collecting int, int64 and long values.
func (*CollectionDef_Int64List) Descriptor ¶
func (*CollectionDef_Int64List) Descriptor() ([]byte, []int)
func (*CollectionDef_Int64List) GetValue ¶
func (m *CollectionDef_Int64List) GetValue() []int64
func (*CollectionDef_Int64List) ProtoMessage ¶
func (*CollectionDef_Int64List) ProtoMessage()
func (*CollectionDef_Int64List) Reset ¶
func (m *CollectionDef_Int64List) Reset()
func (*CollectionDef_Int64List) String ¶
func (m *CollectionDef_Int64List) String() string
type CollectionDef_Int64List_ ¶
type CollectionDef_Int64List_ struct {
Int64List *CollectionDef_Int64List `protobuf:"bytes,3,opt,name=int64_list,json=int64List,oneof"`
}
type CollectionDef_NodeList ¶
type CollectionDef_NodeList struct {
Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"`
}
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 ¶
func (*CollectionDef_NodeList) Descriptor() ([]byte, []int)
func (*CollectionDef_NodeList) GetValue ¶
func (m *CollectionDef_NodeList) GetValue() []string
func (*CollectionDef_NodeList) ProtoMessage ¶
func (*CollectionDef_NodeList) ProtoMessage()
func (*CollectionDef_NodeList) Reset ¶
func (m *CollectionDef_NodeList) Reset()
func (*CollectionDef_NodeList) String ¶
func (m *CollectionDef_NodeList) String() string
type CollectionDef_NodeList_ ¶
type CollectionDef_NodeList_ struct {
NodeList *CollectionDef_NodeList `protobuf:"bytes,1,opt,name=node_list,json=nodeList,oneof"`
}
type MetaGraphDef ¶
type MetaGraphDef struct { MetaInfoDef *MetaGraphDef_MetaInfoDef `protobuf:"bytes,1,opt,name=meta_info_def,json=metaInfoDef" json:"meta_info_def,omitempty"` // GraphDef. GraphDef *tffw.GraphDef `protobuf:"bytes,2,opt,name=graph_def,json=graphDef" json:"graph_def,omitempty"` // SaverDef. SaverDef *SaverDef `protobuf:"bytes,3,opt,name=saver_def,json=saverDef" json:"saver_def,omitempty"` // collection_def: Map from collection name to collections. // See CollectionDef section for details. CollectionDef map[string]*CollectionDef `` /* 167-byte string literal not displayed */ // signature_def: Map from user supplied key for a signature to a single // SignatureDef. SignatureDef map[string]*SignatureDef `` /* 164-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" json:"asset_file_def,omitempty"` }
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 ¶
func (*MetaGraphDef) Descriptor() ([]byte, []int)
func (*MetaGraphDef) GetAssetFileDef ¶
func (m *MetaGraphDef) GetAssetFileDef() []*AssetFileDef
func (*MetaGraphDef) GetCollectionDef ¶
func (m *MetaGraphDef) GetCollectionDef() map[string]*CollectionDef
func (*MetaGraphDef) GetGraphDef ¶
func (m *MetaGraphDef) GetGraphDef() *tffw.GraphDef
func (*MetaGraphDef) GetMetaInfoDef ¶
func (m *MetaGraphDef) GetMetaInfoDef() *MetaGraphDef_MetaInfoDef
func (*MetaGraphDef) GetSaverDef ¶
func (m *MetaGraphDef) GetSaverDef() *SaverDef
func (*MetaGraphDef) GetSignatureDef ¶
func (m *MetaGraphDef) GetSignatureDef() map[string]*SignatureDef
func (*MetaGraphDef) ProtoMessage ¶
func (*MetaGraphDef) ProtoMessage()
func (*MetaGraphDef) Reset ¶
func (m *MetaGraphDef) Reset()
func (*MetaGraphDef) String ¶
func (m *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" 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 *tffw.OpList `protobuf:"bytes,2,opt,name=stripped_op_list,json=strippedOpList" 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 *google_protobuf.Any `protobuf:"bytes,3,opt,name=any_info,json=anyInfo" 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" 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" 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" json:"tensorflow_git_version,omitempty"` }
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 ¶
func (*MetaGraphDef_MetaInfoDef) Descriptor() ([]byte, []int)
func (*MetaGraphDef_MetaInfoDef) GetAnyInfo ¶
func (m *MetaGraphDef_MetaInfoDef) GetAnyInfo() *google_protobuf.Any
func (*MetaGraphDef_MetaInfoDef) GetMetaGraphVersion ¶
func (m *MetaGraphDef_MetaInfoDef) GetMetaGraphVersion() string
func (*MetaGraphDef_MetaInfoDef) GetStrippedOpList ¶
func (m *MetaGraphDef_MetaInfoDef) GetStrippedOpList() *tffw.OpList
func (*MetaGraphDef_MetaInfoDef) GetTags ¶
func (m *MetaGraphDef_MetaInfoDef) GetTags() []string
func (*MetaGraphDef_MetaInfoDef) GetTensorflowGitVersion ¶
func (m *MetaGraphDef_MetaInfoDef) GetTensorflowGitVersion() string
func (*MetaGraphDef_MetaInfoDef) GetTensorflowVersion ¶
func (m *MetaGraphDef_MetaInfoDef) GetTensorflowVersion() string
func (*MetaGraphDef_MetaInfoDef) ProtoMessage ¶
func (*MetaGraphDef_MetaInfoDef) ProtoMessage()
func (*MetaGraphDef_MetaInfoDef) Reset ¶
func (m *MetaGraphDef_MetaInfoDef) Reset()
func (*MetaGraphDef_MetaInfoDef) String ¶
func (m *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 `` /* 128-byte string literal not displayed */ // One or more MetaGraphs. MetaGraphs []*MetaGraphDef `protobuf:"bytes,2,rep,name=meta_graphs,json=metaGraphs" json:"meta_graphs,omitempty"` }
SavedModel is the high level serialization format for TensorFlow Models. See [todo: doc links, similar to session_bundle] for more information.
func (*SavedModel) Descriptor ¶
func (*SavedModel) Descriptor() ([]byte, []int)
func (*SavedModel) GetMetaGraphs ¶
func (m *SavedModel) GetMetaGraphs() []*MetaGraphDef
func (*SavedModel) GetSavedModelSchemaVersion ¶
func (m *SavedModel) GetSavedModelSchemaVersion() int64
func (*SavedModel) ProtoMessage ¶
func (*SavedModel) ProtoMessage()
func (*SavedModel) Reset ¶
func (m *SavedModel) Reset()
func (*SavedModel) String ¶
func (m *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" 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" 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" 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" json:"max_to_keep,omitempty"` // Shard the save files, one per device that has Variable nodes. Sharded bool `protobuf:"varint,5,opt,name=sharded" 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 `` /* 137-byte string literal not displayed */ Version SaverDef_CheckpointFormatVersion `protobuf:"varint,7,opt,name=version,enum=tensorflow.SaverDef_CheckpointFormatVersion" json:"version,omitempty"` }
Protocol buffer representing the configuration of a Saver.
func (*SaverDef) Descriptor ¶
func (*SaverDef) GetFilenameTensorName ¶
func (*SaverDef) GetKeepCheckpointEveryNHours ¶
func (*SaverDef) GetMaxToKeep ¶
func (*SaverDef) GetRestoreOpName ¶
func (*SaverDef) GetSaveTensorName ¶
func (*SaverDef) GetSharded ¶
func (*SaverDef) GetVersion ¶
func (m *SaverDef) GetVersion() SaverDef_CheckpointFormatVersion
func (*SaverDef) ProtoMessage ¶
func (*SaverDef) ProtoMessage()
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) EnumDescriptor ¶
func (SaverDef_CheckpointFormatVersion) EnumDescriptor() ([]byte, []int)
func (SaverDef_CheckpointFormatVersion) String ¶
func (x SaverDef_CheckpointFormatVersion) String() string
type SignatureDef ¶
type SignatureDef struct { // Named input parameters. Inputs map[string]*TensorInfo `` /* 132-byte string literal not displayed */ // Named output parameters. Outputs map[string]*TensorInfo `` /* 134-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" json:"method_name,omitempty"` }
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 ¶
func (*SignatureDef) Descriptor() ([]byte, []int)
func (*SignatureDef) GetInputs ¶
func (m *SignatureDef) GetInputs() map[string]*TensorInfo
func (*SignatureDef) GetMethodName ¶
func (m *SignatureDef) GetMethodName() string
func (*SignatureDef) GetOutputs ¶
func (m *SignatureDef) GetOutputs() map[string]*TensorInfo
func (*SignatureDef) ProtoMessage ¶
func (*SignatureDef) ProtoMessage()
func (*SignatureDef) Reset ¶
func (m *SignatureDef) Reset()
func (*SignatureDef) String ¶
func (m *SignatureDef) String() string
type TensorInfo ¶
type TensorInfo struct { // Types that are valid to be assigned to Encoding: // *TensorInfo_Name // *TensorInfo_CooSparse_ Encoding isTensorInfo_Encoding `protobuf_oneof:"encoding"` Dtype tffw.DataType `protobuf:"varint,2,opt,name=dtype,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 *tffw.TensorShapeProto `protobuf:"bytes,3,opt,name=tensor_shape,json=tensorShape" json:"tensor_shape,omitempty"` }
Information about a Tensor necessary for feeding or retrieval.
func (*TensorInfo) Descriptor ¶
func (*TensorInfo) Descriptor() ([]byte, []int)
func (*TensorInfo) GetCooSparse ¶
func (m *TensorInfo) GetCooSparse() *TensorInfo_CooSparse
func (*TensorInfo) GetDtype ¶
func (m *TensorInfo) GetDtype() tffw.DataType
func (*TensorInfo) GetEncoding ¶
func (m *TensorInfo) GetEncoding() isTensorInfo_Encoding
func (*TensorInfo) GetName ¶
func (m *TensorInfo) GetName() string
func (*TensorInfo) GetTensorShape ¶
func (m *TensorInfo) GetTensorShape() *tffw.TensorShapeProto
func (*TensorInfo) ProtoMessage ¶
func (*TensorInfo) ProtoMessage()
func (*TensorInfo) Reset ¶
func (m *TensorInfo) Reset()
func (*TensorInfo) String ¶
func (m *TensorInfo) String() string
func (*TensorInfo) XXX_OneofFuncs ¶
func (*TensorInfo) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
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" 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" 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" json:"dense_shape_tensor_name,omitempty"` }
For sparse tensors, The COO encoding stores a triple of values, indices, and shape.
func (*TensorInfo_CooSparse) Descriptor ¶
func (*TensorInfo_CooSparse) Descriptor() ([]byte, []int)
func (*TensorInfo_CooSparse) GetDenseShapeTensorName ¶
func (m *TensorInfo_CooSparse) GetDenseShapeTensorName() string
func (*TensorInfo_CooSparse) GetIndicesTensorName ¶
func (m *TensorInfo_CooSparse) GetIndicesTensorName() string
func (*TensorInfo_CooSparse) GetValuesTensorName ¶
func (m *TensorInfo_CooSparse) GetValuesTensorName() string
func (*TensorInfo_CooSparse) ProtoMessage ¶
func (*TensorInfo_CooSparse) ProtoMessage()
func (*TensorInfo_CooSparse) Reset ¶
func (m *TensorInfo_CooSparse) Reset()
func (*TensorInfo_CooSparse) String ¶
func (m *TensorInfo_CooSparse) String() string
type TensorInfo_CooSparse_ ¶
type TensorInfo_CooSparse_ struct {
CooSparse *TensorInfo_CooSparse `protobuf:"bytes,4,opt,name=coo_sparse,json=cooSparse,oneof"`
}
type TensorInfo_Name ¶
type TensorInfo_Name struct {
Name string `protobuf:"bytes,1,opt,name=name,oneof"`
}