pub trait TensorCustomOps<T: TensorElement> {
// Required methods
fn apply_custom_op(
&self,
op_name: &str,
other_inputs: &[&Tensor<T>],
params: &OperationParams,
) -> Result<Vec<Tensor<T>>>;
fn apply_custom_op_with_registry(
&self,
registry: &CustomOperationRegistry,
op_name: &str,
other_inputs: &[&Tensor<T>],
params: &OperationParams,
) -> Result<Vec<Tensor<T>>>;
}Expand description
Extension trait to add custom operation support to tensors
Required Methods§
Sourcefn apply_custom_op(
&self,
op_name: &str,
other_inputs: &[&Tensor<T>],
params: &OperationParams,
) -> Result<Vec<Tensor<T>>>
fn apply_custom_op( &self, op_name: &str, other_inputs: &[&Tensor<T>], params: &OperationParams, ) -> Result<Vec<Tensor<T>>>
Sourcefn apply_custom_op_with_registry(
&self,
registry: &CustomOperationRegistry,
op_name: &str,
other_inputs: &[&Tensor<T>],
params: &OperationParams,
) -> Result<Vec<Tensor<T>>>
fn apply_custom_op_with_registry( &self, registry: &CustomOperationRegistry, op_name: &str, other_inputs: &[&Tensor<T>], params: &OperationParams, ) -> Result<Vec<Tensor<T>>>
Apply a custom operation using a specific registry