Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce tensorflow size for android?

I am trying to use TensorFlow in my android app. But the .so file is little bit larger than needed, is there a way to reduce libtensorflow_inference.so size?

Link TensorFlow-Android-Inference

like image 429
Vardan95 Avatar asked Mar 12 '26 05:03

Vardan95


1 Answers

There's no good guide to doing this yet, but you can start by removing unneeded ops using the print_selective_registration_header script: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/print_selective_registration_header.py

This needs to be documented more extensively.

like image 187
Pete Warden Avatar answered Mar 14 '26 23:03

Pete Warden



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!