pub struct Cos<N>(pub N);Expand description
Operator that applies f[g](x) = cos(g(x)) element-wise to a buffer.
Tuple Fields§
§0: NTrait Implementations§
Source§impl<T, N> Differentiable<T> for Cos<N>
impl<T, N> Differentiable<T> for Cos<N>
Source§type Adjoint = Negate<Mul<<N as Differentiable<T>>::Adjoint, Sin<N>>>
type Adjoint = Negate<Mul<<N as Differentiable<T>>::Adjoint, Sin<N>>>
The adjoint operator; i.e. the gradient.
Source§fn evaluate_adjoint<C: Context, CR: AsRef<C>>(
&self,
target: T,
ctx: CR,
) -> AegirResult<Self::Adjoint, C>
fn evaluate_adjoint<C: Context, CR: AsRef<C>>( &self, target: T, ctx: CR, ) -> AegirResult<Self::Adjoint, C>
Helper method that computes the adjoint and evaluates its value. Read more
Source§impl<C, N, F> Function<C> for Cos<N>
impl<C, N, F> Function<C> for Cos<N>
Source§impl<N: Node> Node for Cos<N>
impl<N: Node> Node for Cos<N>
fn add<N: Node>(self, other: N) -> Add<Self, N>where
Self: Sized,
fn sub<N: Node>(self, other: N) -> Sub<Self, N>where
Self: Sized,
fn mul<N: Node>(self, other: N) -> Mul<Self, N>where
Self: Sized,
fn div<N: Node>(self, other: N) -> Div<Self, N>where
Self: Sized,
fn dot<N: Node>(self, other: N) -> TensorDot<Self, N>where
Self: Sized,
fn abs(self) -> Abs<Self>where
Self: Sized,
fn neg(self) -> Negate<Self>where
Self: Sized,
fn pow<P>(self, power: P) -> Power<Self, P>where
Self: Sized,
fn ln(self) -> Ln<Self>where
Self: Sized,
fn squared(self) -> Square<Self>where
Self: Sized,
fn sum(self) -> Sum<Self>where
Self: Sized,
fn sigmoid(self) -> Sigmoid<Self>where
Self: Sized,
impl<N: Copy> Copy for Cos<N>
impl<N> StructuralPartialEq for Cos<N>
Auto Trait Implementations§
impl<N> Freeze for Cos<N>where
N: Freeze,
impl<N> RefUnwindSafe for Cos<N>where
N: RefUnwindSafe,
impl<N> Send for Cos<N>where
N: Send,
impl<N> Sync for Cos<N>where
N: Sync,
impl<N> Unpin for Cos<N>where
N: Unpin,
impl<N> UnwindSafe for Cos<N>where
N: 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