Skip to main content

RawTensorModel

Trait RawTensorModel 

Source
pub trait RawTensorModel: ModelInfo {
    // Required methods
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 TensorBatch,
    ) -> Pin<Box<dyn Future<Output = Result<TensorBatch>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn input_signature(&self) -> &[TensorSpec];
    fn output_signature(&self) -> &[TensorSpec];

    // Provided methods
    fn run_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        inputs: &'life1 [TensorBatch],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TensorBatch>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn max_batch_size(&self) -> usize { ... }
    fn warmup<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 TensorBatch, ) -> Pin<Box<dyn Future<Output = Result<TensorBatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn input_signature(&self) -> &[TensorSpec]

Source

fn output_signature(&self) -> &[TensorSpec]

Provided Methods§

Source

fn run_batch<'life0, 'life1, 'async_trait>( &'life0 self, inputs: &'life1 [TensorBatch], ) -> Pin<Box<dyn Future<Output = Result<Vec<TensorBatch>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn max_batch_size(&self) -> usize

Source

fn warmup<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Implementors§