pub trait LinearizableOp<V: Differentiable + Send + Sync + 'static>:
Send
+ Sync
+ 'static {
type Linearized: LinearizedOp<V> + Send + Sync + 'static;
// Required methods
fn primal(&self, inputs: &[&V]) -> AdResult<Vec<V>>;
fn input_schema(&self, inputs: &[&V]) -> AdResult<Schema>;
fn output_schema(&self, inputs: &[&V], outputs: &[V]) -> AdResult<Schema>;
fn linearize(
&self,
inputs: &[&V],
outputs: &[V],
) -> AdResult<Self::Linearized>;
// Provided methods
fn checkpoint_hint(&self) -> CheckpointHint { ... }
fn apply(&self, inputs: &[&Value<V>]) -> AdResult<Vec<Value<V>>>
where Self: Sized + Clone { ... }
fn apply_one(&self, inputs: &[&Value<V>]) -> AdResult<Value<V>>
where Self: Sized + Clone { ... }
}Required Associated Types§
type Linearized: LinearizedOp<V> + Send + Sync + 'static
Required Methods§
fn primal(&self, inputs: &[&V]) -> AdResult<Vec<V>>
fn input_schema(&self, inputs: &[&V]) -> AdResult<Schema>
fn output_schema(&self, inputs: &[&V], outputs: &[V]) -> AdResult<Schema>
fn linearize(&self, inputs: &[&V], outputs: &[V]) -> AdResult<Self::Linearized>
Provided Methods§
Sourcefn checkpoint_hint(&self) -> CheckpointHint
fn checkpoint_hint(&self) -> CheckpointHint
Return a retain-vs-replay hint for the runtime checkpoint policy.