tflite-rs icon indicating copy to clipboard operation
tflite-rs copied to clipboard

Bump tensorflow to 2.2.3?

Open r-wheeler opened this issue 4 years ago • 8 comments

I found a few tflite ops (mostly rnn related) that were supported in the master of tensorflow but not in the specific commit these bindings were built against. I was able to compile updated bindings by

  • updating the tensorflow submodule to point to master
  • updating the downloads (the tflite delegates now need absl)
  • and updating the build.rs by adding:

.clang_arg(format!("-I{}/downloads/absl/", submodules_str) to Builder .include(submodules.join("downloads/absl/")) to cpp_build::Config

Would you be open to a PR bumping the tensorflow version to incorporate some of the new ops / changes to tflite?

r-wheeler avatar May 27 '20 21:05 r-wheeler

Hi, thanks for the interest. You are welcome to open a PR. I'll check it.

boncheolgu avatar May 29 '20 03:05 boncheolgu

Thanks, will look at getting a PR in the works. Currently debugging why the crate works correctly if I set cargo to install from a local directory (after running update-downloads) but not when pointing to my fork on github.

./third_party/eigen3/Eigen/Core:1:10: fatal error: 'Eigen/Core' file not found
#include "Eigen/Core"
         ^~~~~~~~~~~~

r-wheeler avatar Jun 01 '20 23:06 r-wheeler

@r-wheeler

I've been evaluating the library and I had to update tensorflow to a different commit for a different use case. I was able to get it to build in my forks. The steps were as follows

  1. Update the submodules for tensorflow (in my case I needed commit tensorflow/tensorflow@d855adfc5a0195788bf5f92c3c7352e638aa1109 ~2.2.0).
  2. Run update_downloads.sh to update the downloads submodule (this will download the new deps for the new tensorflow version).
  3. Patch the Makefile so that the project builds. I came across two issues (tensorflow/tensorflow#35869, tensorflow/tensorflow#36689) that solved the linking issue. In my case, since I didn't want to fork tensorflow, I just included the patched Makefile in my tflite-rs fork and then I copy it over to the tflite build process in build.rs.

nemosupremo avatar Jun 09 '20 20:06 nemosupremo

@nemosupremo How did this library work out for you? Going to try to work up opening a PR in here to bump to latest stable tensorflow

r-wheeler avatar Oct 24 '20 01:10 r-wheeler

@r-wheeler I needed to use a seperate commit for compatibility with Google's Edge TPU library. I've been using my fork for months without issue.

nemosupremo avatar Oct 24 '20 04:10 nemosupremo

@r-wheeler I needed to use a seperate commit for compatibility with Google's Edge TPU library. I've been using my fork for months without issue.

@r-wheeler Hi there, I do need the Google's Edge TPU support for my current project, any update? 👍

wisonye avatar Nov 30 '20 04:11 wisonye

@r-wheeler I currently have it compiling to 2.4, just extended off of nemosupremo's solution and had to install googlemock to my usr/includes, and it worked fine.

ericmcbride avatar Feb 07 '21 21:02 ericmcbride

Opened a PR for a bump to 2.4.1: https://github.com/boncheolgu/tflite-rs/pull/42

bkirwi avatar Mar 10 '21 03:03 bkirwi