Documentation ¶
Index ¶
- Variables
- type SaveSliceInfoDef
- func (*SaveSliceInfoDef) Descriptor() ([]byte, []int)deprecated
- func (x *SaveSliceInfoDef) GetFullName() string
- func (x *SaveSliceInfoDef) GetFullShape() []int64
- func (x *SaveSliceInfoDef) GetVarOffset() []int64
- func (x *SaveSliceInfoDef) GetVarShape() []int64
- func (*SaveSliceInfoDef) ProtoMessage()
- func (x *SaveSliceInfoDef) ProtoReflect() protoreflect.Message
- func (x *SaveSliceInfoDef) Reset()
- func (x *SaveSliceInfoDef) String() string
- type VariableAggregation
- func (VariableAggregation) Descriptor() protoreflect.EnumDescriptor
- func (x VariableAggregation) Enum() *VariableAggregation
- func (VariableAggregation) EnumDescriptor() ([]byte, []int)deprecated
- func (x VariableAggregation) Number() protoreflect.EnumNumber
- func (x VariableAggregation) String() string
- func (VariableAggregation) Type() protoreflect.EnumType
- type VariableDef
- func (*VariableDef) Descriptor() ([]byte, []int)deprecated
- func (x *VariableDef) GetAggregation() VariableAggregation
- func (x *VariableDef) GetInitialValueName() string
- func (x *VariableDef) GetInitializerName() string
- func (x *VariableDef) GetIsResource() bool
- func (x *VariableDef) GetSaveSliceInfoDef() *SaveSliceInfoDef
- func (x *VariableDef) GetSnapshotName() string
- func (x *VariableDef) GetSynchronization() VariableSynchronization
- func (x *VariableDef) GetTrainable() bool
- func (x *VariableDef) GetVariableName() string
- func (*VariableDef) ProtoMessage()
- func (x *VariableDef) ProtoReflect() protoreflect.Message
- func (x *VariableDef) Reset()
- func (x *VariableDef) String() string
- type VariableSynchronization
- func (VariableSynchronization) Descriptor() protoreflect.EnumDescriptor
- func (x VariableSynchronization) Enum() *VariableSynchronization
- func (VariableSynchronization) EnumDescriptor() ([]byte, []int)deprecated
- func (x VariableSynchronization) Number() protoreflect.EnumNumber
- func (x VariableSynchronization) String() string
- func (VariableSynchronization) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VariableSynchronization_name = map[int32]string{ 0: "VARIABLE_SYNCHRONIZATION_AUTO", 1: "VARIABLE_SYNCHRONIZATION_NONE", 2: "VARIABLE_SYNCHRONIZATION_ON_WRITE", 3: "VARIABLE_SYNCHRONIZATION_ON_READ", } VariableSynchronization_value = map[string]int32{ "VARIABLE_SYNCHRONIZATION_AUTO": 0, "VARIABLE_SYNCHRONIZATION_NONE": 1, "VARIABLE_SYNCHRONIZATION_ON_WRITE": 2, "VARIABLE_SYNCHRONIZATION_ON_READ": 3, } )
Enum value maps for VariableSynchronization.
View Source
var ( VariableAggregation_name = map[int32]string{ 0: "VARIABLE_AGGREGATION_NONE", 1: "VARIABLE_AGGREGATION_SUM", 2: "VARIABLE_AGGREGATION_MEAN", 3: "VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA", } VariableAggregation_value = map[string]int32{ "VARIABLE_AGGREGATION_NONE": 0, "VARIABLE_AGGREGATION_SUM": 1, "VARIABLE_AGGREGATION_MEAN": 2, "VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA": 3, } )
Enum value maps for VariableAggregation.
View Source
var File_tensorflow_core_framework_variable_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type SaveSliceInfoDef ¶
type SaveSliceInfoDef struct { // Name of the full variable of which this is a slice. FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` // Shape of the full variable. FullShape []int64 `protobuf:"varint,2,rep,packed,name=full_shape,json=fullShape,proto3" json:"full_shape,omitempty"` // Offset of this variable into the full variable. VarOffset []int64 `protobuf:"varint,3,rep,packed,name=var_offset,json=varOffset,proto3" json:"var_offset,omitempty"` // Shape of this variable. VarShape []int64 `protobuf:"varint,4,rep,packed,name=var_shape,json=varShape,proto3" json:"var_shape,omitempty"` // contains filtered or unexported fields }
func (*SaveSliceInfoDef) Descriptor
deprecated
func (*SaveSliceInfoDef) Descriptor() ([]byte, []int)
Deprecated: Use SaveSliceInfoDef.ProtoReflect.Descriptor instead.
func (*SaveSliceInfoDef) GetFullName ¶
func (x *SaveSliceInfoDef) GetFullName() string
func (*SaveSliceInfoDef) GetFullShape ¶
func (x *SaveSliceInfoDef) GetFullShape() []int64
func (*SaveSliceInfoDef) GetVarOffset ¶
func (x *SaveSliceInfoDef) GetVarOffset() []int64
func (*SaveSliceInfoDef) GetVarShape ¶
func (x *SaveSliceInfoDef) GetVarShape() []int64
func (*SaveSliceInfoDef) ProtoMessage ¶
func (*SaveSliceInfoDef) ProtoMessage()
func (*SaveSliceInfoDef) ProtoReflect ¶
func (x *SaveSliceInfoDef) ProtoReflect() protoreflect.Message
func (*SaveSliceInfoDef) Reset ¶
func (x *SaveSliceInfoDef) Reset()
func (*SaveSliceInfoDef) String ¶
func (x *SaveSliceInfoDef) String() string
type VariableAggregation ¶
type VariableAggregation int32
Indicates how a distributed variable will be aggregated.
const ( // `NONE`: This is the default, giving an error if you use a // variable-update operation with multiple replicas. VariableAggregation_VARIABLE_AGGREGATION_NONE VariableAggregation = 0 // `SUM`: Add the updates across replicas. VariableAggregation_VARIABLE_AGGREGATION_SUM VariableAggregation = 1 // `MEAN`: Take the arithmetic mean ("average") of the updates across // replicas. VariableAggregation_VARIABLE_AGGREGATION_MEAN VariableAggregation = 2 // `ONLY_FIRST_REPLICA`: This is for when every replica is performing the same // update, but we only want to perform the update once. Used, e.g., for the // global step counter. VariableAggregation_VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA VariableAggregation = 3 )
func (VariableAggregation) Descriptor ¶
func (VariableAggregation) Descriptor() protoreflect.EnumDescriptor
func (VariableAggregation) Enum ¶
func (x VariableAggregation) Enum() *VariableAggregation
func (VariableAggregation) EnumDescriptor
deprecated
func (VariableAggregation) EnumDescriptor() ([]byte, []int)
Deprecated: Use VariableAggregation.Descriptor instead.
func (VariableAggregation) Number ¶
func (x VariableAggregation) Number() protoreflect.EnumNumber
func (VariableAggregation) String ¶
func (x VariableAggregation) String() string
func (VariableAggregation) Type ¶
func (VariableAggregation) Type() protoreflect.EnumType
type VariableDef ¶
type VariableDef struct { // Name of the variable tensor. VariableName string `protobuf:"bytes,1,opt,name=variable_name,json=variableName,proto3" json:"variable_name,omitempty"` // Name of the tensor holding the variable's initial value. InitialValueName string `protobuf:"bytes,6,opt,name=initial_value_name,json=initialValueName,proto3" json:"initial_value_name,omitempty"` // Name of the initializer op. InitializerName string `protobuf:"bytes,2,opt,name=initializer_name,json=initializerName,proto3" json:"initializer_name,omitempty"` // Name of the snapshot tensor. SnapshotName string `protobuf:"bytes,3,opt,name=snapshot_name,json=snapshotName,proto3" json:"snapshot_name,omitempty"` // Support for saving variables as slices of a larger variable. SaveSliceInfoDef *SaveSliceInfoDef `protobuf:"bytes,4,opt,name=save_slice_info_def,json=saveSliceInfoDef,proto3" json:"save_slice_info_def,omitempty"` // Whether to represent this as a ResourceVariable. IsResource bool `protobuf:"varint,5,opt,name=is_resource,json=isResource,proto3" json:"is_resource,omitempty"` // Whether this variable should be trained. Trainable bool `protobuf:"varint,7,opt,name=trainable,proto3" json:"trainable,omitempty"` // Indicates when a distributed variable will be synced. Synchronization VariableSynchronization `protobuf:"varint,8,opt,name=synchronization,proto3,enum=tensorflow.VariableSynchronization" json:"synchronization,omitempty"` // Indicates how a distributed variable will be aggregated. Aggregation VariableAggregation `protobuf:"varint,9,opt,name=aggregation,proto3,enum=tensorflow.VariableAggregation" json:"aggregation,omitempty"` // contains filtered or unexported fields }
Protocol buffer representing a Variable.
func (*VariableDef) Descriptor
deprecated
func (*VariableDef) Descriptor() ([]byte, []int)
Deprecated: Use VariableDef.ProtoReflect.Descriptor instead.
func (*VariableDef) GetAggregation ¶
func (x *VariableDef) GetAggregation() VariableAggregation
func (*VariableDef) GetInitialValueName ¶
func (x *VariableDef) GetInitialValueName() string
func (*VariableDef) GetInitializerName ¶
func (x *VariableDef) GetInitializerName() string
func (*VariableDef) GetIsResource ¶
func (x *VariableDef) GetIsResource() bool
func (*VariableDef) GetSaveSliceInfoDef ¶
func (x *VariableDef) GetSaveSliceInfoDef() *SaveSliceInfoDef
func (*VariableDef) GetSnapshotName ¶
func (x *VariableDef) GetSnapshotName() string
func (*VariableDef) GetSynchronization ¶
func (x *VariableDef) GetSynchronization() VariableSynchronization
func (*VariableDef) GetTrainable ¶
func (x *VariableDef) GetTrainable() bool
func (*VariableDef) GetVariableName ¶
func (x *VariableDef) GetVariableName() string
func (*VariableDef) ProtoMessage ¶
func (*VariableDef) ProtoMessage()
func (*VariableDef) ProtoReflect ¶
func (x *VariableDef) ProtoReflect() protoreflect.Message
func (*VariableDef) Reset ¶
func (x *VariableDef) Reset()
func (*VariableDef) String ¶
func (x *VariableDef) String() string
type VariableSynchronization ¶
type VariableSynchronization int32
Indicates when a distributed variable will be synced.
const ( // `AUTO`: Indicates that the synchronization will be determined by the // current `DistributionStrategy` (eg. With `MirroredStrategy` this would be // `ON_WRITE`). VariableSynchronization_VARIABLE_SYNCHRONIZATION_AUTO VariableSynchronization = 0 // `NONE`: Indicates that there will only be one copy of the variable, so // there is no need to sync. VariableSynchronization_VARIABLE_SYNCHRONIZATION_NONE VariableSynchronization = 1 // `ON_WRITE`: Indicates that the variable will be updated across devices // every time it is written. VariableSynchronization_VARIABLE_SYNCHRONIZATION_ON_WRITE VariableSynchronization = 2 // `ON_READ`: Indicates that the variable will be aggregated across devices // when it is read (eg. when checkpointing or when evaluating an op that uses // the variable). VariableSynchronization_VARIABLE_SYNCHRONIZATION_ON_READ VariableSynchronization = 3 )
func (VariableSynchronization) Descriptor ¶
func (VariableSynchronization) Descriptor() protoreflect.EnumDescriptor
func (VariableSynchronization) Enum ¶
func (x VariableSynchronization) Enum() *VariableSynchronization
func (VariableSynchronization) EnumDescriptor
deprecated
func (VariableSynchronization) EnumDescriptor() ([]byte, []int)
Deprecated: Use VariableSynchronization.Descriptor instead.
func (VariableSynchronization) Number ¶
func (x VariableSynchronization) Number() protoreflect.EnumNumber
func (VariableSynchronization) String ¶
func (x VariableSynchronization) String() string
func (VariableSynchronization) Type ¶
func (VariableSynchronization) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.