pub struct OnnxOptions {
pub ignore_value_info: bool,
pub assertions: Vec<String>,
}Expand description
Options for the ONNX loader, carried as JSON.
Follows the same principle as TransformSpec: a typed struct that
serializes to a JSON object, so a caller can pass either the struct or a
JSON string, and the C and Python entry points can pass the string.
An unknown field is an error rather than being ignored, so a misspelling cannot look like an option that took effect.
Fields§
§ignore_value_info: boolDiscard the shapes the model file declares and let tract infer them.
assertions: Vec<String>Assertions over the model symbols, applied once the model is parsed, for
instance ["h>=0", "w>=0"]. Each one goes to tract’s assertion parser
unchanged.
Implementations§
Trait Implementations§
Source§impl Clone for OnnxOptions
impl Clone for OnnxOptions
Source§fn clone(&self) -> OnnxOptions
fn clone(&self) -> OnnxOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OnnxOptions
impl Debug for OnnxOptions
Source§impl Default for OnnxOptions
impl Default for OnnxOptions
Source§fn default() -> OnnxOptions
fn default() -> OnnxOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OnnxOptionswhere
OnnxOptions: Default,
impl<'de> Deserialize<'de> for OnnxOptionswhere
OnnxOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<OnnxOptions> for OnnxOptionsSpec
impl From<OnnxOptions> for OnnxOptionsSpec
Source§fn from(o: OnnxOptions) -> Self
fn from(o: OnnxOptions) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OnnxOptions
impl PartialEq for OnnxOptions
Source§impl Serialize for OnnxOptions
impl Serialize for OnnxOptions
impl StructuralPartialEq for OnnxOptions
Auto Trait Implementations§
impl Freeze for OnnxOptions
impl RefUnwindSafe for OnnxOptions
impl Send for OnnxOptions
impl Sync for OnnxOptions
impl Unpin for OnnxOptions
impl UnsafeUnpin for OnnxOptions
impl UnwindSafe for OnnxOptions
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