MultiComponentModel

Trait MultiComponentModel 

Source
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§

Source

fn load_components<P: AsRef<Path>>(path: P) -> Result<Self, CandleError>
where Self: Sized,

Load all model components from a directory

Source

fn forward_pipeline(&self, inputs: &[&Tensor]) -> Result<Tensor, CandleError>

Run inference through the complete pipeline

Source

fn component_info(&self) -> Vec<String>

Get information about the loaded components

Implementors§