Struct icu_segmenter::provider::LstmDataFloat32
source · pub struct LstmDataFloat32<'data> { /* private fields */ }
Expand description
The struct that stores a LSTM model.
🚧 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.
Implementations§
source§impl<'data> LstmDataFloat32<'data>
impl<'data> LstmDataFloat32<'data>
sourcepub fn try_from_parts(
model: ModelType,
dic: ZeroMap<'data, UnvalidatedStr, u16>,
embedding: LstmMatrix2<'data>,
fw_w: LstmMatrix3<'data>,
fw_u: LstmMatrix3<'data>,
fw_b: LstmMatrix2<'data>,
bw_w: LstmMatrix3<'data>,
bw_u: LstmMatrix3<'data>,
bw_b: LstmMatrix2<'data>,
time_w: LstmMatrix3<'data>,
time_b: LstmMatrix1<'data>
) -> Result<Self, DataError>
pub fn try_from_parts( model: ModelType, dic: ZeroMap<'data, UnvalidatedStr, u16>, embedding: LstmMatrix2<'data>, fw_w: LstmMatrix3<'data>, fw_u: LstmMatrix3<'data>, fw_b: LstmMatrix2<'data>, bw_w: LstmMatrix3<'data>, bw_u: LstmMatrix3<'data>, bw_b: LstmMatrix2<'data>, time_w: LstmMatrix3<'data>, time_b: LstmMatrix1<'data> ) -> Result<Self, DataError>
Creates a LstmDataFloat32 with the given data. Fails if the matrix dimensions are inconsisent.
Trait Implementations§
source§impl<'data> Clone for LstmDataFloat32<'data>
impl<'data> Clone for LstmDataFloat32<'data>
source§fn clone(&self) -> LstmDataFloat32<'data>
fn clone(&self) -> LstmDataFloat32<'data>
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<'data> Debug for LstmDataFloat32<'data>
impl<'data> Debug for LstmDataFloat32<'data>
source§impl<'de: 'data, 'data> Deserialize<'de> for LstmDataFloat32<'data>
impl<'de: 'data, 'data> Deserialize<'de> for LstmDataFloat32<'data>
source§fn deserialize<S>(deserializer: S) -> Result<Self, S::Error>where
S: Deserializer<'de>,
fn deserialize<S>(deserializer: S) -> Result<Self, S::Error>where
S: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'data> PartialEq for LstmDataFloat32<'data>
impl<'data> PartialEq for LstmDataFloat32<'data>
source§fn eq(&self, other: &LstmDataFloat32<'data>) -> bool
fn eq(&self, other: &LstmDataFloat32<'data>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> Yokeable<'a> for LstmDataFloat32<'static>
impl<'a> Yokeable<'a> for LstmDataFloat32<'static>
§type Output = LstmDataFloat32<'a>
type Output = LstmDataFloat32<'a>
This type MUST be
Self
with the 'static
replaced with 'a
, i.e. Self<'a>
source§fn transform_owned(self) -> Self::Output
fn transform_owned(self) -> Self::Output
source§impl<'zf, 'zf_inner> ZeroFrom<'zf, LstmDataFloat32<'zf_inner>> for LstmDataFloat32<'zf>
impl<'zf, 'zf_inner> ZeroFrom<'zf, LstmDataFloat32<'zf_inner>> for LstmDataFloat32<'zf>
source§fn zero_from(this: &'zf LstmDataFloat32<'zf_inner>) -> Self
fn zero_from(this: &'zf LstmDataFloat32<'zf_inner>) -> Self
Clone the other
C
into a struct that may retain references into C
.impl<'data> StructuralPartialEq for LstmDataFloat32<'data>
Auto Trait Implementations§
impl<'data> RefUnwindSafe for LstmDataFloat32<'data>
impl<'data> Send for LstmDataFloat32<'data>
impl<'data> Sync for LstmDataFloat32<'data>
impl<'data> Unpin for LstmDataFloat32<'data>
impl<'data> UnwindSafe for LstmDataFloat32<'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