Enum tfrecord::protobuf::VariableAggregation
source · [−]#[repr(i32)]
pub enum VariableAggregation {
None,
Sum,
Mean,
OnlyFirstReplica,
}
Expand description
Indicates how a distributed variable will be aggregated.
Variants
None
NONE
: This is the default, giving an error if you use a
variable-update operation with multiple replicas.
Sum
SUM
: Add the updates across replicas.
Mean
MEAN
: Take the arithmetic mean (“average”) of the updates across
replicas.
OnlyFirstReplica
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.
Implementations
Trait Implementations
sourceimpl Clone for VariableAggregation
impl Clone for VariableAggregation
sourcefn clone(&self) -> VariableAggregation
fn clone(&self) -> VariableAggregation
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 VariableAggregation
impl Debug for VariableAggregation
sourceimpl Default for VariableAggregation
impl Default for VariableAggregation
sourcefn default() -> VariableAggregation
fn default() -> VariableAggregation
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for VariableAggregation
impl<'de> Deserialize<'de> for VariableAggregation
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<VariableAggregation> for i32
impl From<VariableAggregation> for i32
sourcefn from(value: VariableAggregation) -> i32
fn from(value: VariableAggregation) -> i32
Converts to this type from the input type.
sourceimpl Hash for VariableAggregation
impl Hash for VariableAggregation
sourceimpl Ord for VariableAggregation
impl Ord for VariableAggregation
sourceimpl PartialOrd<VariableAggregation> for VariableAggregation
impl PartialOrd<VariableAggregation> for VariableAggregation
sourcefn partial_cmp(&self, other: &VariableAggregation) -> Option<Ordering>
fn partial_cmp(&self, other: &VariableAggregation) -> 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 VariableAggregation
impl Serialize for VariableAggregation
impl Copy for VariableAggregation
impl Eq for VariableAggregation
impl StructuralEq for VariableAggregation
impl StructuralPartialEq for VariableAggregation
Auto Trait Implementations
impl RefUnwindSafe for VariableAggregation
impl Send for VariableAggregation
impl Sync for VariableAggregation
impl Unpin for VariableAggregation
impl UnwindSafe for VariableAggregation
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