Git Product home page Git Product logo

Comments (15)

advaitjain avatar advaitjain commented on September 26, 2024

Windows is currently fully community supported and the builds are not part of any CI or something that the TFLM engineers are set up to test. Often errors are the result of some incompatibility with the shell commands (which appears to be the case here).

Bazel is linux only and TFLM does not have any support for cmake at this time.

I would recommend attempting to build the reference kernels and pasting the full error log from the following command:

make -f tensorflow/lite/micro/tools/make/Makefile hello_world

Also, if the final goal is to use TFLM from within an IDE, I would suggest trying out the project generation script. Something like (copied from https://github.com/tensorflow/tflite-micro/blob/16a9b1e8bfd69a73fcadff210aecf63085d9cbd4/tensorflow/lite/micro/tools/ci_build/test_project_generation.sh):

git clone tensorflow/tflite-micro tflite-micro
cd tflite-micro
python3 tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py /tmp/tflm-out -e hello_world
cp tensorflow/lite/micro/tools/project_generation/Makefile /tmp/tflm-out
cd /tmp/tflm-out
make -j8 examples

If you can get these steps to work on Windows, you can also use the tree from /tmp/tflm-out in your IDE.

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

Thank you! I am attaching the errors for the two recommendations in "make hello_world errors.txt" (the first step suggested) and "python create_tflm_tree errors.txt". The python tree build might work if the first one worked?

I didn't know about the python tree build script, that could be helpful. Hopefully I can fix this hello_world make build and perhaps get some traction.

make hello_world errors.txt

python create_tflm_tree errors.txt

from tflite-micro.

advaitjain avatar advaitjain commented on September 26, 2024

The error that you are seeing is:

FIND: Parameter format not correct
FIND: Parameter format not correct
File not found - *.cc
File not found - *.h

possibly coming from

TFL_CC_SRCS := \
$(shell find tensorflow/lite/ -type d \( -path tensorflow/lite/experimental -o -path tensorflow/lite/micro \) -prune -false -o -name "*.cc" -o -name "*.c")
TFL_CC_HDRS := \
$(shell find tensorflow/lite/ -type d \( -path tensorflow/lite/experimental -o -path tensorflow/lite/micro \) -prune -false -o -name "*.h")

If you can figure out how to get this working on Windows, that might get you unblocked.

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

Thank you... so this makefile will not be tested to support Windows? If I work through it perhaps it could be a PR?

Just knowing that I'm not doing something else wrong and that I need to debug this Makefile is very helpful.

from tflite-micro.

advaitjain avatar advaitjain commented on September 26, 2024

Correct, the makefile is not tested on Windows.

But any fixes that you have can certainly be reviewed and merged so please feel free to make a pull request.

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

Hello @advaitjain,
I was able to get back to this task and work through the issues keeping everything from working on Windows. I have added four python scripts to the make/ folder, and modified four makefile or bash scripts to fix the issues, I hope incorporating a few python scripts to work around the problem of running "Find" on Windows is OK. Everything should function exactly the same on Linux.

If these changes could be pulled in, I would then be able to run the project generator, then from there automate adding the TFLM source code to a Visual Studio C/C++ project. How do you recommend I submit these changes for review? A normal pull request?

Note: I don't see any ..\google Make_internal.inc files, so I wasn't able to fully test that.

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

Note: In addition, the list_third_party_sources target in the Makefile doesn't appear to correctly print the third party source files. The list_third_party_headers target seems to work properly. When you run the create_tflm_tree.py script, the third party source code doesn't get copied over as a result of this issue.

from tflite-micro.

petewarden avatar petewarden commented on September 26, 2024

Just following up on this - Do you have a pull request with your changes? I'd be happy to take a look.

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

Hi Pete!
I believe I attempted a pull request a few weeks ago but wasn't able to, I'll check again. I have a tool I've written that pulls everything down from GitHub, adds python scripts, modifies makefiles, runs the make file, makes modifications to third party libraries, adds everything to a Visual Studio project, and everything builds and runs perfectly with no errors or warnings. I've slept several times since a few weeks ago when I did that, I need to make sure a pull request will cover everything.

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

@petewarden FYI I have signed a CLA, but it appears my "Create Pull Request" button is still disabled. Do I just need to wait a little while to see that enabled?

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

Hi @petewarden and @advaitjain ,
Below is an update on my progress, in case you are interested. Everything is pulled into Visual Studio and Virtuoso and building properly. I'm only appearing to see the "yes" get detected with the speech mock demo data:

https://youtu.be/Hb0-PUMRyV8

I'm very close to having everything up and running, real system audio should be streaming correctly, I'm just not sure if there's an issue with the LatestAudioTimestamp() that I'm using. If the mock audio worked, then I think I should be able to get the live audio stream working, but at the moment the mock audio isn't quite working either...

Are you still interested in a pull request from me to pull in the changes to let TFLM compile in Visual Studio without errors/warnings?

Thanks!

from tflite-micro.

embeddetech avatar embeddetech commented on September 26, 2024

@petewarden I'm also wondering if the micro speech demo isn't finished yet? I see a note about needing to fix a big with the start_ms being less than zero. Also, it appears that inference is only performed every 100ms when using the mock data, there are 5 new slices (20ms each) added each pass through loop(), but then inference only happens once per pass through loop(), so the LSTM might be expecting to be evaluated on a 20ms window stride, but actually evaluating every 100ms?

from tflite-micro.

advaitjain avatar advaitjain commented on September 26, 2024

Are you still interested in a pull request from me to pull in the changes to let TFLM compile in Visual Studio without errors/warnings?

Assuming that the change fit well with the existing build system, we would be open to a PR that adds support for Visual Studio.

Also w.r.t. #407 (comment), we can figure out what a reasonable path forward would be.

from tflite-micro.

advaitjain avatar advaitjain commented on September 26, 2024

I'm going to close this bug since there hasn't been any activity in over a month.

from tflite-micro.

JavaldeUB avatar JavaldeUB commented on September 26, 2024

hi,
I'm getting similar issues here.
I have WSL in my windows OS and already clone the repo from tflite-micro. I have everything in the Ubuntu distribution and installed dependencies asked (numpy and Pillow). However, whenever in tfllite-micro calling the Makefile I get this:

sudo make -f tensorflow/lite/micro/tools/make/Makefile test_hello_world_test

tensorflow/lite/micro/tools/make/downloads/flatbuffers already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/kissfft already exists, skipping the download.
tensorflow/lite/micro/tools/make/downloads/pigweed already exists, skipping the download.
make: *** No rule to make target 'test_hello_world_test'. Stop.

hello_world folder exists in examples but inside there are evaluate files (.py evaluate_test.cc etc)
I'm getting a bit crazy about this and a hand would be appreciated.
All the best,
Javier

from tflite-micro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.