boncheolgu / tflite-rs

Apache License 2.0
109 stars 53 forks source link

Bump tensorflow to 2.2.3? #30

Open r-wheeler opened 4 years ago

r-wheeler commented 4 years ago

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

.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?

boncheolgu commented 4 years ago

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

r-wheeler commented 4 years ago

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"
         ^~~~~~~~~~~~
nemosupremo commented 4 years ago

@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.
r-wheeler commented 3 years ago

@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

nemosupremo commented 3 years ago

@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.

wisonye commented 3 years ago

@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? 👍

ericmcbride commented 3 years ago

@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.

bkirwi commented 3 years ago

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