Struct Tuple

Source
pub struct Tuple<T>(/* private fields */);

Trait Implementations§

Source§

impl<T: Clone> Clone for Tuple<T>

Source§

fn clone(&self) -> Tuple<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for Tuple<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A, OUT, FUNC> Func<Tuple<(A,)>, (A,), OUT> for FUNC
where FUNC: Fn(A) -> OUT,

Source§

fn invoke(&self, input: (A,)) -> OUT

Source§

impl<A, B, OUT, FUNC> Func<Tuple<(A, B)>, (A, B), OUT> for FUNC
where FUNC: Fn(A, B) -> OUT,

Source§

fn invoke(&self, input: (A, B)) -> OUT

Source§

impl<A, B, C, OUT, FUNC> Func<Tuple<(A, B, C)>, (A, B, C), OUT> for FUNC
where FUNC: Fn(A, B, C) -> OUT,

Source§

fn invoke(&self, input: (A, B, C)) -> OUT

Source§

impl<A, B, C, D, OUT, FUNC> Func<Tuple<(A, B, C, D)>, (A, B, C, D), OUT> for FUNC
where FUNC: Fn(A, B, C, D) -> OUT,

Source§

fn invoke(&self, input: (A, B, C, D)) -> OUT

Source§

impl<A, B, C, D, E, OUT, FUNC> Func<Tuple<(A, B, C, D, E)>, (A, B, C, D, E), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E) -> OUT,

Source§

fn invoke(&self, input: (A, B, C, D, E)) -> OUT

Source§

impl<A, B, C, D, E, F, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F)>, (A, B, C, D, E, F), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F) -> OUT,

Source§

fn invoke(&self, input: (A, B, C, D, E, F)) -> OUT

Source§

impl<A, B, C, D, E, F, G, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F, G)>, (A, B, C, D, E, F, G), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F, G) -> OUT,

Source§

fn invoke(&self, input: (A, B, C, D, E, F, G)) -> OUT

Source§

impl<A, B, C, D, E, F, G, H, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F, G, H)>, (A, B, C, D, E, F, G, H), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F, G, H) -> OUT,

Source§

fn invoke(&self, input: (A, B, C, D, E, F, G, H)) -> OUT

Source§

impl<A, B, C, D, E, F, G, H, I, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F, G, H, I)>, (A, B, C, D, E, F, G, H, I), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F, G, H, I) -> OUT,

Source§

impl<A, B, C, D, E, F, G, H, I, J, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F, G, H, I, J)>, (A, B, C, D, E, F, G, H, I, J), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F, G, H, I, J) -> OUT,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F, G, H, I, J, K)>, (A, B, C, D, E, F, G, H, I, J, K), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F, G, H, I, J, K) -> OUT,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, OUT, FUNC> Func<Tuple<(A, B, C, D, E, F, G, H, I, J, K, L)>, (A, B, C, D, E, F, G, H, I, J, K, L), OUT> for FUNC
where FUNC: Fn(A, B, C, D, E, F, G, H, I, J, K, L) -> OUT,

Source§

impl<A> GenericValue<Tuple<(A,)>, <A as ValueSpec>::Tensors, <A as ValueSpec>::Gradient> for (A,)
where A: Value, A::Tensors: TensorIter,

Source§

fn gv_tensors(&self) -> A::Tensors

Source§

fn gv_grad( tensors: &A::Tensors, grad_map: &HashMap<usize, Tensor>, ) -> A::Gradient

Source§

fn gv_grad_map( tensors: &A::Tensors, grad: A::Gradient, out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B> GenericValue<Tuple<(A, B)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient)> for (A, B)
where A: Value, B: Value, (A::Tensors, B::Tensors): TensorIter,

Source§

fn gv_tensors(&self) -> (A::Tensors, B::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors), grad: (A::Gradient, B::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C> GenericValue<Tuple<(A, B, C)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient)> for (A, B, C)
where A: Value, B: Value, C: Value, (A::Tensors, B::Tensors, C::Tensors): TensorIter,

Source§

fn gv_tensors(&self) -> (A::Tensors, B::Tensors, C::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D> GenericValue<Tuple<(A, B, C, D)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient)> for (A, B, C, D)
where A: Value, B: Value, C: Value, D: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors): TensorIter,

Source§

fn gv_tensors(&self) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E> GenericValue<Tuple<(A, B, C, D, E)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient)> for (A, B, C, D, E)
where A: Value, B: Value, C: Value, D: Value, E: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F> GenericValue<Tuple<(A, B, C, D, E, F)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient)> for (A, B, C, D, E, F)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F, G> GenericValue<Tuple<(A, B, C, D, E, F, G)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors, <G as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient, <G as ValueSpec>::Gradient)> for (A, B, C, D, E, F, G)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, G: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F, G, H> GenericValue<Tuple<(A, B, C, D, E, F, G, H)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors, <G as ValueSpec>::Tensors, <H as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient, <G as ValueSpec>::Gradient, <H as ValueSpec>::Gradient)> for (A, B, C, D, E, F, G, H)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, G: Value, H: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F, G, H, I> GenericValue<Tuple<(A, B, C, D, E, F, G, H, I)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors, <G as ValueSpec>::Tensors, <H as ValueSpec>::Tensors, <I as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient, <G as ValueSpec>::Gradient, <H as ValueSpec>::Gradient, <I as ValueSpec>::Gradient)> for (A, B, C, D, E, F, G, H, I)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, G: Value, H: Value, I: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F, G, H, I, J> GenericValue<Tuple<(A, B, C, D, E, F, G, H, I, J)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors, <G as ValueSpec>::Tensors, <H as ValueSpec>::Tensors, <I as ValueSpec>::Tensors, <J as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient, <G as ValueSpec>::Gradient, <H as ValueSpec>::Gradient, <I as ValueSpec>::Gradient, <J as ValueSpec>::Gradient)> for (A, B, C, D, E, F, G, H, I, J)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, G: Value, H: Value, I: Value, J: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient, J::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient, J::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> GenericValue<Tuple<(A, B, C, D, E, F, G, H, I, J, K)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors, <G as ValueSpec>::Tensors, <H as ValueSpec>::Tensors, <I as ValueSpec>::Tensors, <J as ValueSpec>::Tensors, <K as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient, <G as ValueSpec>::Gradient, <H as ValueSpec>::Gradient, <I as ValueSpec>::Gradient, <J as ValueSpec>::Gradient, <K as ValueSpec>::Gradient)> for (A, B, C, D, E, F, G, H, I, J, K)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, G: Value, H: Value, I: Value, J: Value, K: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient, J::Gradient, K::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient, J::Gradient, K::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> GenericValue<Tuple<(A, B, C, D, E, F, G, H, I, J, K, L)>, (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors, <G as ValueSpec>::Tensors, <H as ValueSpec>::Tensors, <I as ValueSpec>::Tensors, <J as ValueSpec>::Tensors, <K as ValueSpec>::Tensors, <L as ValueSpec>::Tensors), (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient, <G as ValueSpec>::Gradient, <H as ValueSpec>::Gradient, <I as ValueSpec>::Gradient, <J as ValueSpec>::Gradient, <K as ValueSpec>::Gradient, <L as ValueSpec>::Gradient)> for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Value, B: Value, C: Value, D: Value, E: Value, F: Value, G: Value, H: Value, I: Value, J: Value, K: Value, L: Value, (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors, L::Tensors): TensorIter,

Source§

fn gv_tensors( &self, ) -> (A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors, L::Tensors)

Source§

fn gv_grad( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors, L::Tensors), grad_map: &HashMap<usize, Tensor>, ) -> (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient, J::Gradient, K::Gradient, L::Gradient)

Source§

fn gv_grad_map( tensors: &(A::Tensors, B::Tensors, C::Tensors, D::Tensors, E::Tensors, F::Tensors, G::Tensors, H::Tensors, I::Tensors, J::Tensors, K::Tensors, L::Tensors), grad: (A::Gradient, B::Gradient, C::Gradient, D::Gradient, E::Gradient, F::Gradient, G::Gradient, H::Gradient, I::Gradient, J::Gradient, K::Gradient, L::Gradient), out: &mut HashMap<usize, Tensor>, )

Source§

impl<'a, A, T, G, X> GenericValue<Tuple<A>, T, G> for &'a X
where X: GenericValue<Tuple<A>, T, G>,

Source§

fn gv_tensors(&self) -> T

Source§

fn gv_grad(tensors: &T, grad_map: &HashMap<usize, Tensor>) -> G

Source§

fn gv_grad_map(tensors: &T, grad: G, out: &mut HashMap<usize, Tensor>)

Source§

impl<T: Copy> Copy for Tuple<T>

Auto Trait Implementations§

§

impl<T> Freeze for Tuple<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Tuple<T>
where T: RefUnwindSafe,

§

impl<T> Send for Tuple<T>
where T: Send,

§

impl<T> Sync for Tuple<T>
where T: Sync,

§

impl<T> Unpin for Tuple<T>
where T: Unpin,

§

impl<T> UnwindSafe for Tuple<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T, M> ApplyModule<M> for T
where M: Module<Input = T>,

Source§

fn apply(&self, module: M) -> M::Output

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,