pub trait ModelProcessor {
    // Required method
    fn forward(&mut self, x: &Tensor, index_pos: usize) -> Result<Tensor>;
}
Expand description

A trait for processing model inputs and generating outputs.

This trait defines a method for processing input tensors through a model and generating output tensors.

Required Methods§

source

fn forward(&mut self, x: &Tensor, index_pos: usize) -> Result<Tensor>

Processes an input tensor and generates an output tensor.

Arguments
  • x - A reference to the input tensor.
  • index_pos - The position index for processing.
Returns

Returns a Result containing the output tensor.

Implementors§

source§

impl ModelProcessor for Model

source§

impl ModelProcessor for DummyModelProcessor

Implementation of ModelProcessor for DummyModelProcessor.