Struct tract_tensorflow::tfpb::tensorflow::VariableDef
source · pub struct VariableDef {
pub variable_name: String,
pub initial_value_name: String,
pub initializer_name: String,
pub snapshot_name: String,
pub save_slice_info_def: Option<SaveSliceInfoDef>,
pub is_resource: bool,
pub trainable: bool,
pub synchronization: i32,
pub aggregation: i32,
}Expand description
Protocol buffer representing a Variable.
Fields§
§variable_name: StringName of the variable tensor.
initial_value_name: StringName of the tensor holding the variable’s initial value.
initializer_name: StringName of the initializer op.
snapshot_name: StringName of the snapshot tensor.
save_slice_info_def: Option<SaveSliceInfoDef>Support for saving variables as slices of a larger variable.
is_resource: boolWhether to represent this as a ResourceVariable.
trainable: boolWhether this variable should be trained.
synchronization: i32Indicates when a distributed variable will be synced.
aggregation: i32Indicates how a distributed variable will be aggregated.
Implementations§
source§impl VariableDef
impl VariableDef
sourcepub fn synchronization(&self) -> VariableSynchronization
pub fn synchronization(&self) -> VariableSynchronization
Returns the enum value of synchronization, or the default if the field is set to an invalid enum value.
sourcepub fn set_synchronization(&mut self, value: VariableSynchronization)
pub fn set_synchronization(&mut self, value: VariableSynchronization)
Sets synchronization to the provided enum value.
sourcepub fn aggregation(&self) -> VariableAggregation
pub fn aggregation(&self) -> VariableAggregation
Returns the enum value of aggregation, or the default if the field is set to an invalid enum value.
sourcepub fn set_aggregation(&mut self, value: VariableAggregation)
pub fn set_aggregation(&mut self, value: VariableAggregation)
Sets aggregation to the provided enum value.
Trait Implementations§
source§impl Clone for VariableDef
impl Clone for VariableDef
source§fn clone(&self) -> VariableDef
fn clone(&self) -> VariableDef
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for VariableDef
impl Debug for VariableDef
source§impl Default for VariableDef
impl Default for VariableDef
source§impl Message for VariableDef
impl Message for VariableDef
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global> ⓘwhere Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global> ⓘwhere Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.source§impl PartialEq<VariableDef> for VariableDef
impl PartialEq<VariableDef> for VariableDef
source§fn eq(&self, other: &VariableDef) -> bool
fn eq(&self, other: &VariableDef) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for VariableDef
Auto Trait Implementations§
impl RefUnwindSafe for VariableDef
impl Send for VariableDef
impl Sync for VariableDef
impl Unpin for VariableDef
impl UnwindSafe for VariableDef
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.