pub trait MultiComponentModel {
// Required methods
fn load_components<P: AsRef<Path>>(path: P) -> Result<Self, CandleError>
where Self: Sized;
fn forward_pipeline(
&self,
inputs: &[&Tensor],
) -> Result<Tensor, CandleError>;
fn component_info(&self) -> Vec<String>;
}Expand description
Trait for models that consist of multiple CoreML components
Required Methods§
Sourcefn load_components<P: AsRef<Path>>(path: P) -> Result<Self, CandleError>where
Self: Sized,
fn load_components<P: AsRef<Path>>(path: P) -> Result<Self, CandleError>where
Self: Sized,
Load all model components from a directory
Sourcefn forward_pipeline(&self, inputs: &[&Tensor]) -> Result<Tensor, CandleError>
fn forward_pipeline(&self, inputs: &[&Tensor]) -> Result<Tensor, CandleError>
Run inference through the complete pipeline
Sourcefn component_info(&self) -> Vec<String>
fn component_info(&self) -> Vec<String>
Get information about the loaded components