pub struct Sequential<A> { /* private fields */ }Expand description
wrapper for applying ai modules sequentially
Implementations§
Trait Implementations§
Source§impl<A: AI<R, S> + Op<Output = S>, B: AI<S, T> + Op<Output = T>, C: AI<T, U> + Op<Output = U>, D: AI<U, V> + Op<Output = V>, E: AI<V, W> + Op<Output = W>, F: AI<W, X> + Op<Output = X>, G: AI<X, Y> + Op<Output = Y>, H: AI<Y, Z>, R, S, T, U, V, W, X, Y, Z> AI<R, Z> for Sequential<(A, B, C, D, E, F, G, H)>
impl<A: AI<R, S> + Op<Output = S>, B: AI<S, T> + Op<Output = T>, C: AI<T, U> + Op<Output = U>, D: AI<U, V> + Op<Output = V>, E: AI<V, W> + Op<Output = W>, F: AI<W, X> + Op<Output = X>, G: AI<X, Y> + Op<Output = Y>, H: AI<Y, Z>, R, S, T, U, V, W, X, Y, Z> AI<R, Z> for Sequential<(A, B, C, D, E, F, G, H)>
Source§impl<A: AI<S, T> + Op<Output = T>, B: AI<T, U> + Op<Output = U>, C: AI<U, V> + Op<Output = V>, D: AI<V, W> + Op<Output = W>, E: AI<W, X> + Op<Output = X>, F: AI<X, Y> + Op<Output = Y>, G: AI<Y, Z>, S, T, U, V, W, X, Y, Z> AI<S, Z> for Sequential<(A, B, C, D, E, F, G)>
impl<A: AI<S, T> + Op<Output = T>, B: AI<T, U> + Op<Output = U>, C: AI<U, V> + Op<Output = V>, D: AI<V, W> + Op<Output = W>, E: AI<W, X> + Op<Output = X>, F: AI<X, Y> + Op<Output = Y>, G: AI<Y, Z>, S, T, U, V, W, X, Y, Z> AI<S, Z> for Sequential<(A, B, C, D, E, F, G)>
Source§impl<A: AI<T, U> + Op<Output = U>, B: AI<U, V> + Op<Output = V>, C: AI<V, W> + Op<Output = W>, D: AI<W, X> + Op<Output = X>, E: AI<X, Y> + Op<Output = Y>, F: AI<Y, Z>, T, U, V, W, X, Y, Z> AI<T, Z> for Sequential<(A, B, C, D, E, F)>
impl<A: AI<T, U> + Op<Output = U>, B: AI<U, V> + Op<Output = V>, C: AI<V, W> + Op<Output = W>, D: AI<W, X> + Op<Output = X>, E: AI<X, Y> + Op<Output = Y>, F: AI<Y, Z>, T, U, V, W, X, Y, Z> AI<T, Z> for Sequential<(A, B, C, D, E, F)>
Source§impl<A: AI<U, V> + Op<Output = V>, B: AI<V, W> + Op<Output = W>, C: AI<W, X> + Op<Output = X>, D: AI<X, Y> + Op<Output = Y>, E: AI<Y, Z>, U, V, W, X, Y, Z> AI<U, Z> for Sequential<(A, B, C, D, E)>
impl<A: AI<U, V> + Op<Output = V>, B: AI<V, W> + Op<Output = W>, C: AI<W, X> + Op<Output = X>, D: AI<X, Y> + Op<Output = Y>, E: AI<Y, Z>, U, V, W, X, Y, Z> AI<U, Z> for Sequential<(A, B, C, D, E)>
Source§impl<A: AI<V, W> + Op<Output = W>, B: AI<W, X> + Op<Output = X>, C: AI<X, Y> + Op<Output = Y>, D: AI<Y, Z>, V, W, X, Y, Z> AI<V, Z> for Sequential<(A, B, C, D)>
impl<A: AI<V, W> + Op<Output = W>, B: AI<W, X> + Op<Output = X>, C: AI<X, Y> + Op<Output = Y>, D: AI<Y, Z>, V, W, X, Y, Z> AI<V, Z> for Sequential<(A, B, C, D)>
Source§impl<A: AI<W, X> + Op<Output = X>, B: AI<X, Y> + Op<Output = Y>, C: AI<Y, Z>, W, X, Y, Z> AI<W, Z> for Sequential<(A, B, C)>
impl<A: AI<W, X> + Op<Output = X>, B: AI<X, Y> + Op<Output = Y>, C: AI<Y, Z>, W, X, Y, Z> AI<W, Z> for Sequential<(A, B, C)>
Source§impl<A: Clone> Clone for Sequential<A>
impl<A: Clone> Clone for Sequential<A>
Source§fn clone(&self) -> Sequential<A>
fn clone(&self) -> Sequential<A>
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<A: Debug> Debug for Sequential<A>
impl<A: Debug> Debug for Sequential<A>
Source§impl<A: Decompose> Decompose for Sequential<A>
impl<A: Decompose> Decompose for Sequential<A>
Source§type Decomposition = <A as Decompose>::Decomposition
type Decomposition = <A as Decompose>::Decomposition
the decomposed type
Source§fn compose(decomposition: Self::Decomposition) -> Self
fn compose(decomposition: 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<A: Default> Default for Sequential<A>
impl<A: Default> Default for Sequential<A>
Source§fn default() -> Sequential<A>
fn default() -> Sequential<A>
Returns the “default value” for a type. Read more
Source§impl<'de, A> Deserialize<'de> for Sequential<A>where
A: Deserialize<'de>,
impl<'de, A> Deserialize<'de> for Sequential<A>where
A: Deserialize<'de>,
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<A: IntoSequence<M>, M: AI<M::Output, M::Output> + Op> IntoSequence<M> for Sequential<Vec<A>>
impl<A: IntoSequence<M>, M: AI<M::Output, M::Output> + Op> IntoSequence<M> for Sequential<Vec<A>>
Source§fn into_sequence(self) -> Sequential<Vec<M>>
fn into_sequence(self) -> Sequential<Vec<M>>
converts into a sequential module list
Source§impl<A: AI<X, X> + Op<Output = X>, X> Op for Sequential<&[A]>
impl<A: AI<X, X> + Op<Output = X>, X> Op for Sequential<&[A]>
Source§type Output = X
type Output = X
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: AI<X, X> + Op<Output = X>, X> Op for Sequential<&mut [A]>
impl<A: AI<X, X> + Op<Output = X>, X> Op for Sequential<&mut [A]>
Source§type Output = X
type Output = X
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = Y>, B: AI<Y, Z> + Op<Output = Z>, Y, Z> Op for Sequential<(A, B)>
impl<A: Op<Output = Y>, B: AI<Y, Z> + Op<Output = Z>, Y, Z> Op for Sequential<(A, B)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = X>, B: AI<Y, Z> + Op<Output = Y>, C: AI<Y, Z> + Op<Output = Z>, X, Y, Z> Op for Sequential<(A, B, C)>
impl<A: Op<Output = X>, B: AI<Y, Z> + Op<Output = Y>, C: AI<Y, Z> + Op<Output = Z>, X, Y, Z> Op for Sequential<(A, B, C)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = W>, B: AI<W, X> + Op<Output = X>, C: AI<Y, Z> + Op<Output = Y>, D: AI<Y, Z> + Op<Output = Z>, W, X, Y, Z> Op for Sequential<(A, B, C, D)>
impl<A: Op<Output = W>, B: AI<W, X> + Op<Output = X>, C: AI<Y, Z> + Op<Output = Y>, D: AI<Y, Z> + Op<Output = Z>, W, X, Y, Z> Op for Sequential<(A, B, C, D)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = V>, B: AI<V, W> + Op<Output = W>, C: AI<W, X> + Op<Output = X>, D: AI<Y, Z> + Op<Output = Y>, E: AI<Y, Z> + Op<Output = Z>, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E)>
impl<A: Op<Output = V>, B: AI<V, W> + Op<Output = W>, C: AI<W, X> + Op<Output = X>, D: AI<Y, Z> + Op<Output = Y>, E: AI<Y, Z> + Op<Output = Z>, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = U>, B: AI<U, V> + Op<Output = V>, C: AI<V, W> + Op<Output = W>, D: AI<W, X> + Op<Output = X>, E: AI<Y, Z> + Op<Output = Y>, F: AI<Y, Z> + Op<Output = Z>, U, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E, F)>
impl<A: Op<Output = U>, B: AI<U, V> + Op<Output = V>, C: AI<V, W> + Op<Output = W>, D: AI<W, X> + Op<Output = X>, E: AI<Y, Z> + Op<Output = Y>, F: AI<Y, Z> + Op<Output = Z>, U, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E, F)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = T>, B: AI<T, U> + Op<Output = U>, C: AI<U, V> + Op<Output = V>, D: AI<V, W> + Op<Output = W>, E: AI<W, X> + Op<Output = X>, F: AI<Y, Z> + Op<Output = Y>, G: AI<Y, Z> + Op<Output = Z>, T, U, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E, F, G)>
impl<A: Op<Output = T>, B: AI<T, U> + Op<Output = U>, C: AI<U, V> + Op<Output = V>, D: AI<V, W> + Op<Output = W>, E: AI<W, X> + Op<Output = X>, F: AI<Y, Z> + Op<Output = Y>, G: AI<Y, Z> + Op<Output = Z>, T, U, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E, F, G)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: Op<Output = S>, B: AI<S, T> + Op<Output = T>, C: AI<T, U> + Op<Output = U>, D: AI<U, V> + Op<Output = V>, E: AI<V, W> + Op<Output = W>, F: AI<W, X> + Op<Output = X>, G: AI<Y, Z> + Op<Output = Y>, H: AI<Y, Z> + Op<Output = Z>, S, T, U, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E, F, G, H)>
impl<A: Op<Output = S>, B: AI<S, T> + Op<Output = T>, C: AI<T, U> + Op<Output = U>, D: AI<U, V> + Op<Output = V>, E: AI<V, W> + Op<Output = W>, F: AI<W, X> + Op<Output = X>, G: AI<Y, Z> + Op<Output = Y>, H: AI<Y, Z> + Op<Output = Z>, S, T, U, V, W, X, Y, Z> Op for Sequential<(A, B, C, D, E, F, G, H)>
Source§type Output = Z
type Output = Z
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A: AI<X, X> + Op<Output = X>, X> Op for Sequential<Vec<A>>
impl<A: AI<X, X> + Op<Output = X>, X> Op for Sequential<Vec<A>>
Source§type Output = X
type Output = X
suggested output type to help with composition coherence. Ideally, Self should implement AI<X,Self::Output> for some X
Source§fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Source§fn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Source§fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
wraps with a cross entropy operation. If temperature is a number it will be used to apply softmax to the logits before computing entropy with the target. if the input will already be a probability distribution instead of logits, put NaN temperature
Source§fn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Source§fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Source§fn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Source§fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
applies to the input, possibly updating internal caches
Source§fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
creates an autoregressive inference
Source§fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Source§fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
applies the operation to every output
Source§fn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Source§fn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Source§fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
fn wrap_inner(self) -> Inner<Self>where
Self: Sized,
wraps the inner value so it can be unwrapped with unwrap inner
Source§impl<A> Serialize for Sequential<A>where
A: Serialize,
impl<A> Serialize for Sequential<A>where
A: Serialize,
Source§impl<W: Wrappable> Wrappable for Sequential<W>
impl<W: Wrappable> Wrappable for Sequential<W>
impl<A: Copy> Copy for Sequential<A>
Auto Trait Implementations§
impl<A> Freeze for Sequential<A>where
A: Freeze,
impl<A> RefUnwindSafe for Sequential<A>where
A: RefUnwindSafe,
impl<A> Send for Sequential<A>where
A: Send,
impl<A> Sync for Sequential<A>where
A: Sync,
impl<A> Unpin for Sequential<A>where
A: Unpin,
impl<A> UnwindSafe for Sequential<A>where
A: 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Shortcuts for T
impl<T> Shortcuts for T
Source§fn classification(self) -> Classification<Self>
fn classification(self) -> Classification<Self>
wraps in a classification wrapper
Source§fn regression(self) -> Regression<Self>
fn regression(self) -> Regression<Self>
wraps in a regression wrapper