Package org.tensorflow.lite
Interface Delegate
-
- All Known Implementing Classes:
NnApiDelegate
public interface Delegate
Wrapper for a native TensorFlow Lite Delegate.WARNING: This is an experimental interface that is subject to change.
If a delegate implementation holds additional resources or memory that should be explicitly freed, then best practice is to add a
close()
method to the implementation and have the client call that explicitly when the delegate instance is no longer in use. While this approach technically allows sharing of a single delegate instance across multiple interpreter instances, the delegate implementation must explicitly support this.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getNativeHandle()
Returns a native handle to the TensorFlow Lite delegate implementation.
-
-
-
Method Detail
-
getNativeHandle
long getNativeHandle()
Returns a native handle to the TensorFlow Lite delegate implementation.Note: The Java
Delegate
maintains ownership of the native delegate instance, and must ensure its existence for the duration of usage with anyInterpreter
.- Returns:
- The native delegate handle. In C/C++, this should be a pointer to 'TfLiteOpaqueDelegate'.
-
-