pub trait Op {
type Output;
Show 33 methods
// Provided methods
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
where Self: Sized,
AbnormalSoftmax<Self>: Op { ... }
fn abs(self) -> Abs<Self>
where Self: Sized,
Abs<Self>: Op { ... }
fn acc_q(self, gamma: f32) -> AccQ<Self>
where AccQ<Self>: Op,
Self: Sized { ... }
fn cat(self, dim: i32) -> Cat<Self>
where Cat<Self>: Op,
Self: Sized { ... }
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
where Self: Sized,
Sequential<(Self, B)>: Op { ... }
fn cross_entropy(self, temperature: f32) -> CrossEntropy<Self>
where CrossEntropy<Self>: Op,
Self: Sized { ... }
fn duplicate(self) -> Duplicate<Self>
where Duplicate<Self>: Op,
Self: Sized { ... }
fn fix_type<Z>(self) -> SetType<Self, Z, Z>
where Self: AI<Z, Z> + Sized { ... }
fn flatten<R: Clone>(self, args: R) -> Flatten<Self, R>
where Flatten<Self, R>: Op,
Self: Sized { ... }
fn forward_fixed<Z>(&self, input: Z) -> Z
where Self: AI<Z, Z> + Sized { ... }
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
where Self: AI<Z, Z> + Sized { ... }
fn forward_typed<W, Z>(&self, input: W) -> Z
where Self: AI<W, Z> + Sized { ... }
fn forward_typed_mut<W, Z>(&mut self, input: W) -> Z
where Self: AI<W, Z> + Sized { ... }
fn infer_autoregressive<X, Y>(self, input: X) -> Autoregression<Self, Y> ⓘ
where Self: AI<X, Y> + AI<Y, Y> + Sized,
Y: Clone { ... }
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
where Self: Sized,
LogSoftmax<Self>: Op { ... }
fn map<B>(self, b: B) -> Map<Sequential<(Self, B)>>
where Map<Sequential<(Self, B)>>: Op,
Self: Sized,
Sequential<(Self, B)>: Op { ... }
fn mean(self) -> Mean<Self>
where Mean<Self>: Op,
Self: Sized { ... }
fn optional(self) -> Option<Self>
where Self: Sized { ... }
fn reshape<R: Clone>(self, args: R) -> Reshape<Self, R>
where Reshape<Self, R>: Op,
Self: Sized { ... }
fn residual(self) -> Residual<Self>
where Residual<Self>: Op,
Self: Sized { ... }
fn separately(self) -> Zip<Self>
where Self: Sized,
Zip<Self>: Op { ... }
fn sequential(self) -> Sequential<Self>
where Self: Sized,
Sequential<Self>: Op { ... }
fn set_type<W, Z>(self) -> SetType<Self, W, Z>
where Self: AI<W, Z> + Sized { ... }
fn soft_choose(self, temperature: f32) -> Choose<Self>
where Self: Sized,
Choose<Self>: Op { ... }
fn softmax(self, temperature: f32) -> Softmax<Self>
where Self: Sized,
Softmax<Self>: Op { ... }
fn squared_error(self) -> SquaredError<Self>
where SquaredError<Self>: Op,
Self: Sized { ... }
fn squeeze(self, dim: i32) -> Squeeze<Self>
where Squeeze<Self>: Op,
Self: Sized { ... }
fn stack(self, dim: i32) -> Stack<Self>
where Stack<Self>: Op,
Self: Sized { ... }
fn to_each(self) -> Map<Self>
where Map<Self>: Op,
Self: Sized { ... }
fn unsqueeze(self, dim: i32) -> Unsqueeze<Self>
where Unsqueeze<Self>: Op,
Self: Sized { ... }
fn sum(self) -> Sum<Self>
where Sum<Self>: Op,
Self: Sized { ... }
fn wrap_inner(self) -> Inner<Self>
where Self: Sized { ... }
fn zip<B>(self, b: B) -> Zip<(Self, B)>
where Self: Sized,
Zip<(Self, B)>: Op { ... }
}Expand description
composition trait
Required Associated Types§
Provided Methods§
Sourcefn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
fn abnormal_softmax(self, temperature: f32) -> AbnormalSoftmax<Self>
wraps with a softmax operation
Sourcefn chain<B>(self, b: B) -> Sequential<(Self, B)>
fn chain<B>(self, b: B) -> Sequential<(Self, B)>
sequences with another ai operation
Sourcefn 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
Sourcefn forward_fixed<Z>(&self, input: Z) -> Z
fn forward_fixed<Z>(&self, input: Z) -> Z
applies to the input
Sourcefn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
fn forward_fixed_mut<Z>(&mut self, input: Z) -> Z
applies to the input
Sourcefn forward_typed<W, Z>(&self, input: W) -> Z
fn forward_typed<W, Z>(&self, input: W) -> Z
applies to the input
Sourcefn 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
Sourcefn 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
Sourcefn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
fn log_softmax(self, temperature: f32) -> LogSoftmax<Self>
wraps with a softmax operation
Sourcefn 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
Sourcefn sequential(self) -> Sequential<Self>
fn sequential(self) -> Sequential<Self>
produces a sequential module
Sourcefn soft_choose(self, temperature: f32) -> Choose<Self>
fn soft_choose(self, temperature: f32) -> Choose<Self>
wraps with a choose operation
Sourcefn squared_error(self) -> SquaredError<Self>
fn squared_error(self) -> SquaredError<Self>
wraps with a mse operation
Sourcefn 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