#[non_exhaustive]pub enum NeuralError {
InvalidBatchSize,
InvalidInputShape,
InvalidOutputShape,
TrainingError(TrainingError),
CoreError(Error),
}Expand description
The NeuralError type is used to define the various errors encountered by the different
components of a neural network. It is designed to be comprehensive, covering a wide range of
potential issues that may arise during the operation of neural network components, such as
invalid configurations, training failures, and other runtime errors. This error type is
intended to provide a clear and consistent way to handle errors across the neural network
components, making it easier to debug and resolve issues that may occur during the development
and execution of neural network models.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidBatchSize
InvalidInputShape
InvalidOutputShape
TrainingError(TrainingError)
CoreError(Error)
Implementations§
Source§impl NeuralError
impl NeuralError
pub fn invalid_batch_size() -> Self
pub fn invalid_input_shape() -> Self
pub fn invalid_output_shape() -> Self
pub fn training_error(field_0: TrainingError) -> Self
pub fn core_error(field_0: Error) -> Self
Trait Implementations§
Source§impl Debug for NeuralError
impl Debug for NeuralError
Source§impl Display for NeuralError
impl Display for NeuralError
Source§impl Error for NeuralError
impl Error for NeuralError
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<Error> for NeuralError
impl From<Error> for NeuralError
Source§impl From<NeuralError> for Error
impl From<NeuralError> for Error
Source§fn from(err: NeuralError) -> Self
fn from(err: NeuralError) -> Self
Converts to this type from the input type.
Source§impl From<TrainingError> for NeuralError
impl From<TrainingError> for NeuralError
Source§fn from(source: TrainingError) -> Self
fn from(source: TrainingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NeuralError
impl !RefUnwindSafe for NeuralError
impl Send for NeuralError
impl Sync for NeuralError
impl Unpin for NeuralError
impl !UnwindSafe for NeuralError
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