Enum tfrecord::protobuf::VariableSynchronization
source · [−]#[repr(i32)]
pub enum VariableSynchronization {
Auto,
None,
OnWrite,
OnRead,
}
Expand description
Indicates when a distributed variable will be synced.
Variants
Auto
AUTO
: Indicates that the synchronization will be determined by the
current DistributionStrategy
(eg. With MirroredStrategy
this would be
ON_WRITE
).
None
NONE
: Indicates that there will only be one copy of the variable, so
there is no need to sync.
OnWrite
ON_WRITE
: Indicates that the variable will be updated across devices
every time it is written.
OnRead
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).
Implementations
Trait Implementations
sourceimpl Clone for VariableSynchronization
impl Clone for VariableSynchronization
sourcefn clone(&self) -> VariableSynchronization
fn clone(&self) -> VariableSynchronization
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VariableSynchronization
impl Debug for VariableSynchronization
sourceimpl Default for VariableSynchronization
impl Default for VariableSynchronization
sourcefn default() -> VariableSynchronization
fn default() -> VariableSynchronization
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for VariableSynchronization
impl<'de> Deserialize<'de> for VariableSynchronization
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<VariableSynchronization> for i32
impl From<VariableSynchronization> for i32
sourcefn from(value: VariableSynchronization) -> i32
fn from(value: VariableSynchronization) -> i32
Converts to this type from the input type.
sourceimpl Hash for VariableSynchronization
impl Hash for VariableSynchronization
sourceimpl Ord for VariableSynchronization
impl Ord for VariableSynchronization
sourceimpl PartialOrd<VariableSynchronization> for VariableSynchronization
impl PartialOrd<VariableSynchronization> for VariableSynchronization
sourcefn partial_cmp(&self, other: &VariableSynchronization) -> Option<Ordering>
fn partial_cmp(&self, other: &VariableSynchronization) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for VariableSynchronization
impl Serialize for VariableSynchronization
impl Copy for VariableSynchronization
impl Eq for VariableSynchronization
impl StructuralEq for VariableSynchronization
impl StructuralPartialEq for VariableSynchronization
Auto Trait Implementations
impl RefUnwindSafe for VariableSynchronization
impl Send for VariableSynchronization
impl Sync for VariableSynchronization
impl Unpin for VariableSynchronization
impl UnwindSafe for VariableSynchronization
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more