pub enum TransformerBulidError {
InvalidProbability,
InvalidNumHeads(i32),
Exception(Exception),
}
Expand description
Error with building a transformer
Variants§
InvalidProbability
Dropout probability must be in the range [0, 1)
InvalidNumHeads(i32)
Invalid number of heads
Exception(Exception)
Exceptions
Trait Implementations§
Source§impl Debug for TransformerBulidError
impl Debug for TransformerBulidError
Source§impl Display for TransformerBulidError
impl Display for TransformerBulidError
Source§impl Error for TransformerBulidError
impl Error for TransformerBulidError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DropoutBuildError> for TransformerBulidError
impl From<DropoutBuildError> for TransformerBulidError
Source§fn from(e: DropoutBuildError) -> Self
fn from(e: DropoutBuildError) -> Self
Converts to this type from the input type.
Source§impl From<Exception> for TransformerBulidError
impl From<Exception> for TransformerBulidError
Source§impl From<MultiHeadAttentionBuildError> for TransformerBulidError
impl From<MultiHeadAttentionBuildError> for TransformerBulidError
Source§fn from(e: MultiHeadAttentionBuildError) -> Self
fn from(e: MultiHeadAttentionBuildError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TransformerBulidError
impl PartialEq for TransformerBulidError
impl StructuralPartialEq for TransformerBulidError
Auto Trait Implementations§
impl Freeze for TransformerBulidError
impl RefUnwindSafe for TransformerBulidError
impl Send for TransformerBulidError
impl Sync for TransformerBulidError
impl Unpin for TransformerBulidError
impl UnwindSafe for TransformerBulidError
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> 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 moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option
.