Documentation ¶
Overview ¶
Package tensorflow is a generated protocol buffer package. It is generated from these files: protobuf/tensorflow/saver.proto It has these top-level messages: SaverDef
Package tensorflow is a generated protocol buffer package.
It is generated from these files:
protobuf/tensorflow/types.proto
It has these top-level messages:
Index ¶
- Variables
- type DataType
- type SaverDef
- func (*SaverDef) Descriptor() ([]byte, []int)
- func (this *SaverDef) Equal(that interface{}) bool
- 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 (this *SaverDef) GoString() string
- func (m *SaverDef) Marshal() (dAtA []byte, err error)
- func (m *SaverDef) MarshalTo(dAtA []byte) (int, error)
- func (*SaverDef) ProtoMessage()
- func (m *SaverDef) Reset()
- func (m *SaverDef) Size() (n int)
- func (this *SaverDef) String() string
- func (m *SaverDef) Unmarshal(dAtA []byte) error
- type SaverDef_CheckpointFormatVersion
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthSaver = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSaver = fmt.Errorf("proto: integer overflow") )
View Source
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",
}
View Source
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,
}
View Source
var SaverDef_CheckpointFormatVersion_name = map[int32]string{
0: "LEGACY",
1: "V1",
2: "V2",
}
View Source
var SaverDef_CheckpointFormatVersion_value = map[string]int32{
"LEGACY": 0,
"V1": 1,
"V2": 2,
}
Functions ¶
This section is empty.
Types ¶
type DataType ¶
type DataType int32
LINT.IfChange
const ( // Not a legal value for DataType. Used to indicate a DataType field // has not been set. DT_INVALID DataType = 0 // Data types that all computation devices are expected to be // capable to support. DT_FLOAT DataType = 1 DT_DOUBLE DataType = 2 DT_INT32 DataType = 3 DT_UINT8 DataType = 4 DT_INT16 DataType = 5 DT_INT8 DataType = 6 DT_STRING DataType = 7 DT_COMPLEX64 DataType = 8 DT_INT64 DataType = 9 DT_BOOL DataType = 10 DT_QINT8 DataType = 11 DT_QUINT8 DataType = 12 DT_QINT32 DataType = 13 DT_BFLOAT16 DataType = 14 DT_QINT16 DataType = 15 DT_QUINT16 DataType = 16 DT_UINT16 DataType = 17 DT_COMPLEX128 DataType = 18 DT_HALF DataType = 19 DT_RESOURCE DataType = 20 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). DT_FLOAT_REF DataType = 101 DT_DOUBLE_REF DataType = 102 DT_INT32_REF DataType = 103 DT_UINT8_REF DataType = 104 DT_INT16_REF DataType = 105 DT_INT8_REF DataType = 106 DT_STRING_REF DataType = 107 DT_COMPLEX64_REF DataType = 108 DT_INT64_REF DataType = 109 DT_BOOL_REF DataType = 110 DT_QINT8_REF DataType = 111 DT_QUINT8_REF DataType = 112 DT_QINT32_REF DataType = 113 DT_BFLOAT16_REF DataType = 114 DT_QINT16_REF DataType = 115 DT_QUINT16_REF DataType = 116 DT_UINT16_REF DataType = 117 DT_COMPLEX128_REF DataType = 118 DT_HALF_REF DataType = 119 DT_RESOURCE_REF DataType = 120 DT_VARIANT_REF DataType = 121 )
func (DataType) EnumDescriptor ¶
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"` }
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. LEGACY SaverDef_CheckpointFormatVersion = 0 // Deprecated format: tf.Saver() which works with tensorflow::table::Table. V1 SaverDef_CheckpointFormatVersion = 1 // Current format: more efficient. V2 SaverDef_CheckpointFormatVersion = 2 )
func (SaverDef_CheckpointFormatVersion) EnumDescriptor ¶
func (SaverDef_CheckpointFormatVersion) EnumDescriptor() ([]byte, []int)
func (SaverDef_CheckpointFormatVersion) String ¶
func (x SaverDef_CheckpointFormatVersion) String() string
Click to show internal directories.
Click to hide internal directories.