Trait rai_core::ValueSpec

source ·
pub trait ValueSpec {
    type Kind;
    type Tensors: TensorIter + 'static;
    type Gradient;
}

Required Associated Types§

Implementations on Foreign Types§

source§

impl ValueSpec for HashMap<usize, Tensor>

source§

impl<'a, T> ValueSpec for &'a T
where T: ValueSpec,

§

type Kind = <T as ValueSpec>::Kind

§

type Tensors = <T as ValueSpec>::Tensors

§

type Gradient = <T as ValueSpec>::Gradient

source§

impl<A> ValueSpec for (A,)
where A: Value, A::Tensors: TensorIter,

source§

impl<A, B> ValueSpec for (A, B)
where A: Value, B: Value, (A::Tensors, B::Tensors): TensorIter,

§

type Kind = BasicValue

§

type Tensors = (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors)

§

type Gradient = (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient)

source§

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

§

type Kind = BasicValue

§

type Tensors = (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors)

§

type Gradient = (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient)

source§

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

§

type Kind = BasicValue

§

type Tensors = (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors)

§

type Gradient = (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient)

source§

impl<A, B, C, D, E> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors)

§

type Gradient = (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient)

source§

impl<A, B, C, D, E, F> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<A as ValueSpec>::Tensors, <B as ValueSpec>::Tensors, <C as ValueSpec>::Tensors, <D as ValueSpec>::Tensors, <E as ValueSpec>::Tensors, <F as ValueSpec>::Tensors)

§

type Gradient = (<A as ValueSpec>::Gradient, <B as ValueSpec>::Gradient, <C as ValueSpec>::Gradient, <D as ValueSpec>::Gradient, <E as ValueSpec>::Gradient, <F as ValueSpec>::Gradient)

source§

impl<A, B, C, D, E, F, G> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<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)

§

type Gradient = (<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)

source§

impl<A, B, C, D, E, F, G, H> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<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)

§

type Gradient = (<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)

source§

impl<A, B, C, D, E, F, G, H, I> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<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)

§

type Gradient = (<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)

source§

impl<A, B, C, D, E, F, G, H, I, J> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<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)

§

type Gradient = (<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)

source§

impl<A, B, C, D, E, F, G, H, I, J, K> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<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)

§

type Gradient = (<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)

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> ValueSpec 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,

§

type Kind = BasicValue

§

type Tensors = (<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)

§

type Gradient = (<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)

source§

impl<const N: usize, T> ValueSpec for [T; N]
where T: Value, [T::Tensors; N]: TensorIter,

§

type Kind = BasicValue

§

type Tensors = [<T as ValueSpec>::Tensors; N]

§

type Gradient = [<T as ValueSpec>::Gradient; N]

Implementors§