How can I configure TensorflowJS Backend(nodejs) to work on Raspberry Pi Zero W? After installing and running nodejs application, I get error saying something like 'this instruction set is not support'. I only managed to find two resources with similar projects using TensorflowJS Backend.

1) https://twitter.com/stephaniecodes/status/1091411482435354624?lang=en

2) https://github.com/tensorflow/tfjs/issues/1065

My lead is that it has something to do with RPI not supporting tfjs-node, node-gyp or the arm architecture. Not being able to support the arm architecture needed.. is this why the Pi doesn't support Operating System such as Ubuntu. The twitter link provided says Build tfjs-node package on the RPI have not been released and didnt give any details on how to overcome this. Would the instructions from this link help me any:

https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides/cross-compiling-arm-nn-for-the-raspberry-pi-and-tensorflow/single-page ?

Any positive direction someone can lead me in to solve issue would be great.

  • @z Eyeland, not too long ago, only Ubuntu could handle TensorFlow. Then Google switched to Debian, so Raspbian can now join in. But 32bit Rpi might have other incompatibility programs. One suggestion is to forget js for now and and try a python to test the waters. – tlfong01 Sep 12 '19 at 1:34
  • Thanks for insight. I thought about switching to Python for this app but doing so would involve understanding how to use http web server and websockets for python. I had problem getting python to run functions after calling the flask.run app function. Ill have to figure something out. – z Eyeland Sep 13 '19 at 18:25
  • 1
    @z Eyeland, Ah, I am NOT suggesting you to switch everything to python. For web applications, of course Node.js, Node-Red are better languages than python. I only only know that Google has switched from Ubantu to Debian, and has been using all the time Python for AI and tensorflow applications. Google might use Go language at lower levels. So I would switch from C++ to Go for low level or specific projects that Go can do better. I think it is not a good idea to use Java or .NET things in Rpi, because they are not well supported. My thinking are for long term planning, though. – tlfong01 Sep 14 '19 at 1:10
  • I read a twitter tweet that using something called yalc would work. I found a yalc project on GitHub but not sure how it relates to Tensorflowjs backend. – z Eyeland Sep 18 '19 at 14:01
  • @z Eyeland, I googled "yalc" but did not find it impressive. It might work for now, but for long term projects, I would hesitate to use it. – tlfong01 Sep 19 '19 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.