tflite_bindings library
Classes
- TFLGpuDelegateOptions
- Creates a new delegate instance that need to be destroyed with DeleteFlowDelegate when delegate is no longer used by tflite.
- TFLGpuDelegateWaitType
- tensorflow#metal_delegate
- TfLiteCoreMlDelegateEnabledDevices
- tensorflow#coreml_delegate
- TfLiteCoreMlDelegateOptions
- TfLiteGpuDelegateOptionsV2
- IMPORTANT: Always use TfLiteGpuDelegateOptionsV2Default() method to create new instance of TfLiteGpuDelegateOptionsV2, otherwise every new added option may break inference.
- TfLiteGpuExperimentalFlags
- Used to toggle experimental flags used in the delegate. Note that this is a bitmask, so the values should be 1, 2, 4, 8, ...etc.
- TfLiteGpuInferencePriority
- TfLiteGpuInferenceUsage
- tensorflow#gpu_delegate Encapsulated compilation/runtime tradeoffs.
- TfLiteQuantizationParams
- Legacy. Will be deprecated in favor of TfLiteAffineQuantization. If per-layer quantization is specified this field will still be populated in addition to TfLiteAffineQuantization. Parameters for asymmetric quantization. Quantized values can be converted back to float using: real_value = scale * (quantized_value - zero_point)
- TfLiteStatus
- tensorflow#c_api_types Note that new error status values may be added in future in order to indicate more fine-grained internal states, therefore, applications should not rely on status values being members of the enum.
- TfLiteType
- Types supported by tensor
- TfLiteXNNPackDelegateOptions
- TfLiteXNNPackDelegateWeightsCache
Constants
- TFLITE_XNNPACK_DELEGATE_FLAG_FORCE_FP16 → const int
- Force FP16 inference for FP32 operators.
- TFLITE_XNNPACK_DELEGATE_FLAG_QS8 → const int
- tensorflow#xnnpack_delegate Enable XNNPACK acceleration for signed quantized 8-bit inference. This includes operators with channel-wise quantized weights.
- TFLITE_XNNPACK_DELEGATE_FLAG_QU8 → const int
- Enable XNNPACK acceleration for unsigned quantized 8-bit inference.
Properties
-
TFLGpuDelegateCreate
→ Pointer<
TfLiteDelegate> Function(Pointer<TFLGpuDelegateOptions> ? options) -
Creates a new delegate instance that need to be destroyed with
TFLDeleteTfLiteGpuDelegate
when delegate is no longer used by TFLite. Whenoptions
is set tonullptr
, the following default values are used: .precision_loss_allowed = false, .wait_type = kPassive,final -
TFLGpuDelegateDelete
→ void Function(Pointer<
TfLiteDelegate> ) -
Destroys a delegate created with
TFLGpuDelegateCreate
call.final - TFLGpuDelegateOptionsDefault → TFLGpuDelegateOptions Function()
-
Populates TFLGpuDelegateOptions as follows:
allow_precision_loss = false;
wait_type = TFLGpuDelegateWaitType::TFLGpuDelegateWaitTypePassive;
enable_quantization = true;
final
-
TfLiteCoreMlDelegateCreate
→ Pointer<
TfLiteDelegate> Function(Pointer<TfLiteCoreMlDelegateOptions> options) -
final
-
TfLiteCoreMlDelegateDelete
→ void Function(Pointer<
TfLiteDelegate> delegate) -
final
- TfLiteGpuDelegateOptionsV2Default → TfLiteGpuDelegateOptionsV2 Function()
-
Populates TfLiteGpuDelegateOptionsV2 as follows:
is_precision_loss_allowed = false
inference_preference = TFLITE_GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER
priority1 = TFLITE_GPU_INFERENCE_PRIORITY_MAX_PRECISION
priority2 = TFLITE_GPU_INFERENCE_PRIORITY_AUTO
priority3 = TFLITE_GPU_INFERENCE_PRIORITY_AUTO
experimental_flags = TFLITE_GPU_EXPERIMENTAL_FLAGS_ENABLE_QUANT
max_delegated_partitions = 1
final
-
TfLiteGpuDelegateV2Create
→ Pointer<
TfLiteDelegate> Function(Pointer<TfLiteGpuDelegateOptionsV2> options) -
Creates a new delegate instance that need to be destroyed with
TfLiteGpuDelegateV2Delete when delegate is no longer used by TFLite.
final
-
TfLiteGpuDelegateV2Delete
→ void Function(Pointer<
TfLiteDelegate> delegate) -
Destroys a delegate created with
TfLiteGpuDelegateV2Create
call.final -
TfLiteXNNPackDelegateCreate
→ Pointer<
TfLiteDelegate> Function(Pointer<TfLiteXNNPackDelegateOptions> options) -
Creates a new delegate instance that need to be destroyed with
TfLiteXNNPackDelegateDelete
when delegate is no longer used by TFLite. Whenoptions
is set tonullptr
, default values are used (see implementation of TfLiteXNNPackDelegateOptionsDefault in the .cc file for details).final -
TfLiteXNNPackDelegateDelete
→ void Function(Pointer<
TfLiteDelegate> delegate) -
Destroys a delegate created with
TfLiteXNNPackDelegateCreate
call.final - TfLiteXNNPackDelegateOptionsDefault → TfLiteXNNPackDelegateOptions Function()
-
Returns a structure with the default XNNPack delegate options.
final
-
TfLiteXNNPackDelegateWeightsCacheCreate
→ Pointer<
TfLiteXNNPackDelegateWeightsCache> Function() -
Creates a new weights cache that can be shared with multiple delegate
instances.
final
-
TfLiteXNNPackWeightsCacheDelete
→ void Function(Pointer<
TfLiteXNNPackDelegateWeightsCache> cache) -
Destroys a weights cache created with
TfLiteXNNPackDelegateWeightsCacheCreate
call.final