pub struct Mse<U>{ /* private fields */ }
Expand description
Mse implementation
Implementations§
Trait Implementations§
Source§impl<'a, U, I, const N: usize> BatchLossFunctionLinear<'a, U, I, DeviceGpu<U>, N> for Mse<U>where
U: Clone + Copy + UnitValue<U> + DataTypeInfo,
DeviceGpu<U>: Device<U>,
for<'b> CudaVecView<'b, U, CudaTensor1dPtr<U, N>>: TryFrom<&'b I, Error = TypeConvertError>,
for<'b> LinearBatchMse<'b, U, N>: Kernel<Args = LinearBatchMseArgs<'b, U, N>>,
impl<'a, U, I, const N: usize> BatchLossFunctionLinear<'a, U, I, DeviceGpu<U>, N> for Mse<U>where
U: Clone + Copy + UnitValue<U> + DataTypeInfo,
DeviceGpu<U>: Device<U>,
for<'b> CudaVecView<'b, U, CudaTensor1dPtr<U, N>>: TryFrom<&'b I, Error = TypeConvertError>,
for<'b> LinearBatchMse<'b, U, N>: Kernel<Args = LinearBatchMseArgs<'b, U, N>>,
type Output = CudaVec<U, CudaTensor1dPtr<U, N>>
Source§fn batch_linear_derive<'b>(
&self,
device: &DeviceGpu<U>,
expected: &'b I,
actual: &'b I,
) -> Result<CudaVec<U, CudaTensor1dPtr<U, N>>, TrainingError>
fn batch_linear_derive<'b>( &self, device: &DeviceGpu<U>, expected: &'b I, actual: &'b I, ) -> Result<CudaVec<U, CudaTensor1dPtr<U, N>>, TrainingError>
Differentiation of loss functions Read more
Source§impl<U> LossFunction<U> for Mse<U>
impl<U> LossFunction<U> for Mse<U>
Source§impl<'a, U, I, const N: usize> LossFunctionLinear<'a, U, I, DeviceGpu<U>, N> for Mse<U>where
U: Clone + Copy + UnitValue<U> + DataTypeInfo,
DeviceGpu<U>: Device<U>,
for<'b> CudaTensor1dPtrView<'b, U, N>: From<&'b I>,
for<'b> LinearMse<'b, U, N>: Kernel<Args = LinearMseArgs<'b, U, N>>,
impl<'a, U, I, const N: usize> LossFunctionLinear<'a, U, I, DeviceGpu<U>, N> for Mse<U>where
U: Clone + Copy + UnitValue<U> + DataTypeInfo,
DeviceGpu<U>: Device<U>,
for<'b> CudaTensor1dPtrView<'b, U, N>: From<&'b I>,
for<'b> LinearMse<'b, U, N>: Kernel<Args = LinearMseArgs<'b, U, N>>,
type Output = CudaTensor1dPtr<U, N>
Source§fn linear_derive<'b>(
&self,
device: &DeviceGpu<U>,
actual: &'b I,
expected: &'b I,
) -> Result<Self::Output, TrainingError>
fn linear_derive<'b>( &self, device: &DeviceGpu<U>, actual: &'b I, expected: &'b I, ) -> Result<Self::Output, TrainingError>
Differentiation of loss functions Read more
Auto Trait Implementations§
impl<U> Freeze for Mse<U>
impl<U> RefUnwindSafe for Mse<U>where
U: RefUnwindSafe,
impl<U> Send for Mse<U>
impl<U> Sync for Mse<U>
impl<U> Unpin for Mse<U>where
U: Unpin,
impl<U> UnwindSafe for Mse<U>where
U: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, U, I, const N: usize> BatchLossFunctionLinear<'a, U, I, DeviceCpu<U>, N> for Twhere
T: LossFunction<U>,
U: UnitValue<U>,
I: BatchSize,
SerializedVecView<'b, U, Arr<U, N>>: for<'b> TryFrom<&'b I, Error = TypeConvertError>,
impl<'a, T, U, I, const N: usize> BatchLossFunctionLinear<'a, U, I, DeviceCpu<U>, N> for Twhere
T: LossFunction<U>,
U: UnitValue<U>,
I: BatchSize,
SerializedVecView<'b, U, Arr<U, N>>: for<'b> TryFrom<&'b I, Error = TypeConvertError>,
type Output = SerializedVec<U, Arr<U, N>>
Source§fn batch_linear_derive<'b>(
&self,
_: &DeviceCpu<U>,
expected: &'b I,
actual: &'b I,
) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>
fn batch_linear_derive<'b>( &self, _: &DeviceCpu<U>, expected: &'b I, actual: &'b I, ) -> Result<SerializedVec<U, Arr<U, N>>, TrainingError>
Differentiation of loss functions Read more
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 more