pub struct LossOutput<B: Backend> { /* private fields */ }Expand description
general loss output for being converted into other loss outputs
Implementations§
Source§impl<B: Backend> LossOutput<B>
impl<B: Backend> LossOutput<B>
Trait Implementations§
Source§impl<B: Backend> AI<(Value<B>, Value<B>), LossOutput<B>> for CrossEntropyLayer
impl<B: Backend> AI<(Value<B>, Value<B>), LossOutput<B>> for CrossEntropyLayer
Source§fn forward(&self, (output, target): (Value<B>, Value<B>)) -> LossOutput<B>
fn forward(&self, (output, target): (Value<B>, Value<B>)) -> LossOutput<B>
applies to the input
Source§fn forward_mut(&mut self, input: X) -> Y
fn forward_mut(&mut self, input: X) -> Y
applies to the input, possibly updating internal caches
Source§impl<B: Backend> AI<(Value<B>, Value<B>), LossOutput<B>> for SquaredErrorLayer
impl<B: Backend> AI<(Value<B>, Value<B>), LossOutput<B>> for SquaredErrorLayer
Source§fn forward(&self, (output, target): (Value<B>, Value<B>)) -> LossOutput<B>
fn forward(&self, (output, target): (Value<B>, Value<B>)) -> LossOutput<B>
applies to the input
Source§fn forward_mut(&mut self, input: X) -> Y
fn forward_mut(&mut self, input: X) -> Y
applies to the input, possibly updating internal caches
Source§impl<B: Backend> AI<LossOutput<B>, ClassificationOutput<B>> for ClassificationLayer
impl<B: Backend> AI<LossOutput<B>, ClassificationOutput<B>> for ClassificationLayer
Source§fn forward(&self, lossoutput: LossOutput<B>) -> ClassificationOutput<B>
fn forward(&self, lossoutput: LossOutput<B>) -> ClassificationOutput<B>
applies to the input
Source§fn forward_mut(&mut self, input: X) -> Y
fn forward_mut(&mut self, input: X) -> Y
applies to the input, possibly updating internal caches
Source§impl<B: Backend> AI<LossOutput<B>, RegressionOutput<B>> for RegressionLayer
impl<B: Backend> AI<LossOutput<B>, RegressionOutput<B>> for RegressionLayer
Source§fn forward(&self, lossoutput: LossOutput<B>) -> RegressionOutput<B>
fn forward(&self, lossoutput: LossOutput<B>) -> RegressionOutput<B>
applies to the input
Source§fn forward_mut(&mut self, input: X) -> Y
fn forward_mut(&mut self, input: X) -> Y
applies to the input, possibly updating internal caches
Source§impl<B: Clone + Backend> Clone for LossOutput<B>
impl<B: Clone + Backend> Clone for LossOutput<B>
Source§fn clone(&self) -> LossOutput<B>
fn clone(&self) -> LossOutput<B>
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 moreSource§impl<B: Backend> Decompose for LossOutput<B>
impl<B: Backend> Decompose for LossOutput<B>
Source§fn compose((loss, output, target): Self::Decomposition) -> Self
fn compose((loss, output, target): Self::Decomposition) -> Self
recreates from the decomposition
Source§fn decompose(self) -> Self::Decomposition
fn decompose(self) -> Self::Decomposition
owned decomposition
Source§fn decompose_cloned(&self) -> Self::Decomposition
fn decompose_cloned(&self) -> Self::Decomposition
decomposition that copies data
Source§impl<'de, B: Backend> Deserialize<'de> for LossOutput<B>
impl<'de, B: Backend> Deserialize<'de> for LossOutput<B>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<B: Backend> Serialize for LossOutput<B>
impl<B: Backend> Serialize for LossOutput<B>
Auto Trait Implementations§
impl<B> Freeze for LossOutput<B>where
<B as Backend>::BoolTensorPrimitive: Freeze,
<B as Backend>::IntTensorPrimitive: Freeze,
<B as Backend>::FloatTensorPrimitive: Freeze,
<B as Backend>::QuantizedTensorPrimitive: Freeze,
impl<B> RefUnwindSafe for LossOutput<B>where
<B as Backend>::BoolTensorPrimitive: RefUnwindSafe,
<B as Backend>::IntTensorPrimitive: RefUnwindSafe,
<B as Backend>::FloatTensorPrimitive: RefUnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: RefUnwindSafe,
impl<B> Send for LossOutput<B>
impl<B> Sync for LossOutput<B>
impl<B> Unpin for LossOutput<B>where
<B as Backend>::BoolTensorPrimitive: Unpin,
<B as Backend>::IntTensorPrimitive: Unpin,
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
impl<B> UnwindSafe for LossOutput<B>where
<B as Backend>::BoolTensorPrimitive: UnwindSafe,
<B as Backend>::IntTensorPrimitive: UnwindSafe,
<B as Backend>::FloatTensorPrimitive: UnwindSafe,
<B as Backend>::QuantizedTensorPrimitive: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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