Struct tflite::model::FlatBufferModel [−][src]
An RAII object that represents a read-only tflite model, copied from disk, or mmapped. This uses flatbuffers as the serialization format.
NOTE: The current API requires that a FlatBufferModel instance be kept alive by the client as long as it is in use by any dependent Interpreter instances.
using namespace tflite;
StderrReporter error_reporter;
auto model = FlatBufferModel::BuildFromFile("interesting_model.tflite",
&error_reporter);
MyOpResolver resolver; // You need to subclass OpResolver to provide
// implementations.
InterpreterBuilder builder(*model, resolver);
std::unique_ptr interpreter;
if(builder(&interpreter) == kTfLiteOk) {
.. run model inference with interpreter
}
OpResolver must be defined to provide your kernel implementations to the interpreter. This is environment specific and may consist of just the builtin ops, or some custom operators you defined to extend tflite.
Fields
_bindgen_opaque_blob: [u64; 3]
Trait Implementations
impl Clone for FlatBufferModel
[src]
fn clone(&self) -> FlatBufferModel
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FlatBufferModel
[src]
impl Debug for FlatBufferModel
[src]
impl Default for FlatBufferModel
[src]
fn default() -> FlatBufferModel
[src]
impl Eq for FlatBufferModel
[src]
impl PartialEq<FlatBufferModel> for FlatBufferModel
[src]
fn eq(&self, other: &FlatBufferModel) -> bool
[src]
fn ne(&self, other: &FlatBufferModel) -> bool
[src]
impl StructuralEq for FlatBufferModel
[src]
impl StructuralPartialEq for FlatBufferModel
[src]
Auto Trait Implementations
impl RefUnwindSafe for FlatBufferModel
impl Send for FlatBufferModel
impl Sync for FlatBufferModel
impl Unpin for FlatBufferModel
impl UnwindSafe for FlatBufferModel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,