Struct RNNTLossConfig
pub struct RNNTLossConfig {
pub blank: usize,
pub logits: bool,
}Expand description
Configuration for RNNTLoss.
Fields§
§blank: usizeIndex of the blank label in the vocabulary. Default: 0.
logits: boolTreat the inputs as logits, applying a log-softmax on the last dimension internally.
If false, the input must already be log-probabilities. Default: true.
Implementations§
§impl RNNTLossConfig
impl RNNTLossConfig
pub fn new() -> RNNTLossConfig
pub fn new() -> RNNTLossConfig
Create a new instance of the config.
§Arguments
§Default Arguments
§blank
Index of the blank label in the vocabulary. Default: 0.
- Defaults to
0
§logits
Treat the inputs as logits, applying a log-softmax on the last dimension internally.
If false, the input must already be log-probabilities. Default: true.
- Defaults to
true
§impl RNNTLossConfig
impl RNNTLossConfig
pub fn with_blank(self, blank: usize) -> RNNTLossConfig
pub fn with_blank(self, blank: usize) -> RNNTLossConfig
Sets the value for the field blank.
Index of the blank label in the vocabulary. Default: 0.
- Defaults to
0
pub fn with_logits(self, logits: bool) -> RNNTLossConfig
pub fn with_logits(self, logits: bool) -> RNNTLossConfig
Sets the value for the field logits.
Treat the inputs as logits, applying a log-softmax on the last dimension internally.
If false, the input must already be log-probabilities. Default: true.
- Defaults to
true
§impl RNNTLossConfig
impl RNNTLossConfig
Trait Implementations§
§impl Clone for RNNTLossConfig
impl Clone for RNNTLossConfig
§fn clone(&self) -> RNNTLossConfig
fn clone(&self) -> RNNTLossConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Config for RNNTLossConfig
impl Config for RNNTLossConfig
§impl Debug for RNNTLossConfig
impl Debug for RNNTLossConfig
§impl<'de> Deserialize<'de> for RNNTLossConfig
impl<'de> Deserialize<'de> for RNNTLossConfig
§fn deserialize<D>(
deserializer: D,
) -> Result<RNNTLossConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RNNTLossConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl Display for RNNTLossConfig
impl Display for RNNTLossConfig
§impl Serialize for RNNTLossConfig
impl Serialize for RNNTLossConfig
§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,
Auto Trait Implementations§
impl Freeze for RNNTLossConfig
impl RefUnwindSafe for RNNTLossConfig
impl Send for RNNTLossConfig
impl Sync for RNNTLossConfig
impl Unpin for RNNTLossConfig
impl UnwindSafe for RNNTLossConfig
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
§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>
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>
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>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more