Struct CTCLossConfig
pub struct CTCLossConfig {
pub blank: usize,
pub zero_infinity: bool,
}Expand description
Configuration for the CTC Loss module.
Fields§
§blank: usizeThe index number used to represent the blank label. Default value is 0.
zero_infinity: boolWhether to zero infinite losses and the associated gradients. Default value is false.
Implementations§
§impl CTCLossConfig
impl CTCLossConfig
pub fn new() -> CTCLossConfig
pub fn new() -> CTCLossConfig
§impl CTCLossConfig
impl CTCLossConfig
pub fn with_blank(self, blank: usize) -> CTCLossConfig
pub fn with_blank(self, blank: usize) -> CTCLossConfig
Sets the value for the field blank.
The index number used to represent the blank label. Default value is 0.
- Defaults to
0
pub fn with_zero_infinity(self, zero_infinity: bool) -> CTCLossConfig
pub fn with_zero_infinity(self, zero_infinity: bool) -> CTCLossConfig
Sets the value for the field zero_infinity.
Whether to zero infinite losses and the associated gradients. Default value is false.
- Defaults to
false
§impl CTCLossConfig
impl CTCLossConfig
Trait Implementations§
§impl Clone for CTCLossConfig
impl Clone for CTCLossConfig
§fn clone(&self) -> CTCLossConfig
fn clone(&self) -> CTCLossConfig
Returns a duplicate 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 more§impl Config for CTCLossConfig
impl Config for CTCLossConfig
§impl Debug for CTCLossConfig
impl Debug for CTCLossConfig
§impl<'de> Deserialize<'de> for CTCLossConfig
impl<'de> Deserialize<'de> for CTCLossConfig
§fn deserialize<D>(
deserializer: D,
) -> Result<CTCLossConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CTCLossConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for CTCLossConfig
impl Display for CTCLossConfig
§impl Serialize for CTCLossConfig
impl Serialize for CTCLossConfig
§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
Auto Trait Implementations§
impl Freeze for CTCLossConfig
impl RefUnwindSafe for CTCLossConfig
impl Send for CTCLossConfig
impl Sync for CTCLossConfig
impl Unpin for CTCLossConfig
impl UnwindSafe for CTCLossConfig
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<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more