#[non_exhaustive]pub enum LstmData<'data> {
Float32(LstmDataFloat32<'data>),
}
Expand description
The data to power the LSTM segmentation model.
This data enum is extensible: more backends may be added in the future. Old data can be used with newer code but not vice versa.
Examples of possible future extensions:
- Variant to store data in 16 instead of 32 bits
- Minor changes to the LSTM model, such as different forward/backward matrix sizes
🚧 This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. While the serde representation of data structs is guaranteed
to be stable, their Rust representation might not be. Use with caution.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Float32(LstmDataFloat32<'data>)
The data as matrices of zerovec f32 values.
Trait Implementations§
Source§impl<'data> BakeSize for LstmData<'data>
impl<'data> BakeSize for LstmData<'data>
Source§fn borrows_size(&self) -> usize
fn borrows_size(&self) -> usize
Returns the size
Source§impl<'de, 'data> Deserialize<'de> for LstmData<'data>where
'de: 'data,
impl<'de, 'data> Deserialize<'de> for LstmData<'data>where
'de: 'data,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LstmData<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LstmData<'data>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MaybeAsVarULE for LstmData<'_>
impl MaybeAsVarULE for LstmData<'_>
Source§impl MaybeEncodeAsVarULE for LstmData<'_>
impl MaybeEncodeAsVarULE for LstmData<'_>
Source§fn maybe_encode_as_varule(
&self,
) -> Option<&<LstmData<'_> as MaybeAsVarULE>::EncodedStruct>
fn maybe_encode_as_varule( &self, ) -> Option<&<LstmData<'_> as MaybeAsVarULE>::EncodedStruct>
Returns the
MaybeAsVarULE::EncodedStruct
that represents this data struct,
or None
if the data struct does not support this representation.Source§impl<'data> Serialize for LstmData<'data>
impl<'data> Serialize for LstmData<'data>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl<'a> Yokeable<'a> for LstmData<'static>
impl<'a> Yokeable<'a> for LstmData<'static>
Source§type Output = LstmData<'a>
type Output = LstmData<'a>
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
impl<'data> StructuralPartialEq for LstmData<'data>
Auto Trait Implementations§
impl<'data> Freeze for LstmData<'data>
impl<'data> RefUnwindSafe for LstmData<'data>
impl<'data> Send for LstmData<'data>
impl<'data> Sync for LstmData<'data>
impl<'data> Unpin for LstmData<'data>
impl<'data> UnwindSafe for LstmData<'data>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more