pub struct Exception { /* private fields */ }Expand description
Exception. Most will come from the C API.
Implementations§
Trait Implementations§
Source§impl<'a, F, G> CallMut<(&'a Array, &'a Array, &'a Array), Array, Exception> for Compiled<F, G>
 
impl<'a, F, G> CallMut<(&'a Array, &'a Array, &'a Array), Array, Exception> for Compiled<F, G>
Source§impl<U, F, G> CallMutWithState<U, (&Array, &Array, &Array), Array, Exception> for Compiled<F, G>
 
impl<U, F, G> CallMutWithState<U, (&Array, &Array, &Array), Array, Exception> for Compiled<F, G>
Source§impl Error for Exception
 
impl Error for Exception
1.30.0 · 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<CrossEntropyBuildError> for Exception
 
impl From<CrossEntropyBuildError> for Exception
Source§fn from(value: CrossEntropyBuildError) -> Self
 
fn from(value: CrossEntropyBuildError) -> Self
Converts to this type from the input type.
Source§impl From<Exception> for AsSliceError
 
impl From<Exception> for AsSliceError
Source§impl From<Exception> for MultiHeadAttentionBuildError
 
impl From<Exception> for MultiHeadAttentionBuildError
Source§impl From<Exception> for TransformerBulidError
 
impl From<Exception> for TransformerBulidError
Source§impl From<InexactDtypeError> for Exception
 
impl From<InexactDtypeError> for Exception
Source§fn from(value: InexactDtypeError) -> Self
 
fn from(value: InexactDtypeError) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for Exception
 
impl From<Infallible> for Exception
Source§fn from(_: Infallible) -> Self
 
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl<'a, F, Arr, Args> IntoKeyedValueAndGrad<'a, Arr, Args, Exception> for F
 
impl<'a, F, Arr, Args> IntoKeyedValueAndGrad<'a, Arr, Args, Exception> for F
Source§fn into_keyed_value_and_grad(
    self,
) -> impl FnMut(KeyedParameters<Arr>, Args) -> Result<(Vec<Array>, KeyedGrad)> + 'a
 
fn into_keyed_value_and_grad( self, ) -> impl FnMut(KeyedParameters<Arr>, Args) -> Result<(Vec<Array>, KeyedGrad)> + 'a
Convert the function/closure into a closure that computes the value and gradient.
Source§impl<'a, F, M, Args> IntoModuleValueAndGrad<'a, M, Args, Array, Exception> for F
 
impl<'a, F, M, Args> IntoModuleValueAndGrad<'a, M, Args, Array, Exception> for F
Source§fn into_module_value_and_grad(
    self,
) -> impl FnMut(&mut M, Args) -> Result<(Array, FlattenedModuleParam), Exception> + 'a
 
fn into_module_value_and_grad( self, ) -> impl FnMut(&mut M, Args) -> Result<(Array, FlattenedModuleParam), Exception> + 'a
Computes the valud and gradient of the passed function 
f(model, args) with regard to the
model’s trainable parameters.Source§impl<'a, F, M, Args> IntoModuleValueAndGrad<'a, M, Args, Vec<Array>, Exception> for F
 
impl<'a, F, M, Args> IntoModuleValueAndGrad<'a, M, Args, Vec<Array>, Exception> for F
Source§fn into_module_value_and_grad(
    self,
) -> impl FnMut(&mut M, Args) -> Result<(Vec<Array>, FlattenedModuleParam), Exception> + 'a
 
fn into_module_value_and_grad( self, ) -> impl FnMut(&mut M, Args) -> Result<(Vec<Array>, FlattenedModuleParam), Exception> + 'a
Computes the valud and gradient of the passed function 
f(model, args) with regard to the
model’s trainable parameters.Source§impl<'a, F> IntoValueAndGrad<'a, Exception> for F
 
impl<'a, F> IntoValueAndGrad<'a, Exception> for F
impl StructuralPartialEq for Exception
Auto Trait Implementations§
impl Freeze for Exception
impl RefUnwindSafe for Exception
impl Send for Exception
impl Sync for Exception
impl Unpin for Exception
impl UnwindSafe for Exception
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.