pub struct OnnxModel { /* private fields */ }Expand description
ONNX model implementation
Implementations§
Source§impl OnnxModel
impl OnnxModel
Sourcepub fn from_directory<P: AsRef<Path>>(path: P) -> EdgeResult<Self>
pub fn from_directory<P: AsRef<Path>>(path: P) -> EdgeResult<Self>
Create a new ONNX model from a directory path
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> EdgeResult<Self>
pub fn from_file<P: AsRef<Path>>(path: P) -> EdgeResult<Self>
Create a new ONNX model from a single .onnx file
Sourcepub fn with_metadata(self, key: String, value: Value) -> Self
pub fn with_metadata(self, key: String, value: Value) -> Self
Add metadata to the model
Trait Implementations§
Source§impl Model for OnnxModel
impl Model for OnnxModel
Source§fn model_type(&self) -> &str
fn model_type(&self) -> &str
Get the model type (e.g., “onnx”, “tensorrt”, “coreml”)
Source§fn model_path(&self) -> &Path
fn model_path(&self) -> &Path
Get the model path or identifier
Source§fn config(&self) -> EdgeResult<Value>
fn config(&self) -> EdgeResult<Value>
Get model configuration as JSON
Source§fn validate(&self) -> EdgeResult<()>
fn validate(&self) -> EdgeResult<()>
Validate that the model files exist and are valid
Auto Trait Implementations§
impl Freeze for OnnxModel
impl RefUnwindSafe for OnnxModel
impl Send for OnnxModel
impl Sync for OnnxModel
impl Unpin for OnnxModel
impl UnwindSafe for OnnxModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more