- TensorFlow.Lite (v2.13.0)
- TensorFlow.Lite.Api (v2.13.0)
- TensorFlow.Lite.Gpu (v2.13.0)
- TensorFlow.Lite.Gpu.Api (v2.13.0)
AppoMobi.Maui.TensorFlow.Lite
To implement gpu acceleration as described here:
https://www.tensorflow.org/lite/android/delegates/gpu?hl=en#enable_gpu_acceleration_2
using AppoMobi.Maui.TensorFlow.Lite;
using AppoMobi.Maui.TensorFlow.Lite.GPU;
...
var options = new Interpreter.Options();
var compatList = new CompatibilityList();
if (compatList.IsDelegateSupportedOnThisDevice && useGpu)
{
var bestOptions = compatList.BestOptionsForThisDevice;
var gpuDelegate = new GpuDelegate(bestOptions);
options.AddDelegate(gpuDelegate);
}
You do not need tensorflow-lite-gpu-delegate-plugin
for this.
Initially it was impossible to use BestOptionsForThisDevice
with Xamarin.TensorFlow.Lite.*
nugets.
https://github.com/xamarin/GooglePlayServicesComponents/issues/793