Trait Primitive
Source pub trait Primitive: Debug {
// Required methods
fn clone_boxed(&self) -> Box<dyn Primitive>;
fn as_any(&self) -> &dyn Any;
fn jvp(
&self,
output: &Tensor,
primals: &[Tensor],
tangents: &[Tensor],
) -> Tensor;
fn vjp(
&self,
output: &Tensor,
primals: &[Tensor],
cotangent: &Tensor,
) -> Vec<Tensor>;
// Provided method
fn dot_label(&self) -> String { ... }
}
Performs copy-assignment from
source
.
Read more
Converts to this type from the input type.
Converts to this type from the input type.