Add Tensorflow to image

Hello dear community,
I learned how to use the Toradex system much better, I would like to consult the following: is it possible to add TensorFlow to the system ?.

I understand a bit how to create a layer and recipe (youtube Toradex Videos).
Could you tell me how to do it or give me some example link?

Thanks in advance.

Sorry we do not have any information on Tensorflow. One can reference the Yocto manuals for information on creating a bitbake recipe. You might want to have a look at Yocto Development Manual and Bitbake User Manual. Note that the Colibri iMX6 is not the correct hardware for running Tensorflow. You might have better luck on the Apalis TK1 platform. Also see here and from a google search here.

Thank you very much, although I can’t add tensorflow, a friend can use it with his Apalis TK1.

Will there be any recipe for machine learning (neural networks) for my Colibri imx6?

There aren’t any machine learning packages like scikit available in OpenEmbedded. If you are not looking for video/audio hardware acceleration one option can be to try a generic distribution rootfs and then install/use packages like scikit-learn etc for machine learning tasks. However please note that the performance of such machine learning libraries on iMX6 will be no where near to x86 and also we have no experience in this domain.

I’m very grateful. Thank you

I have no recipes for cross compile but was able to do native Tensor Flow build on Apalis iMX6 module. It should also work on Colibri iMx6 and on TK1 (however you need to play with optimization options for TK1)

 -  opkg update
 -  opkg install packagegroup-sdk-target
 - git clone https://github.com/tensorflow/tensorflow 
 - cd tensorflow
 - git checkout r1.2
 - opkg install tar 
 - opkg install coreutils  (not sure if its needed)
 - opkg install findutils
 - opkg install zlib
 - Copy zlib.h and zconf.h from http://sources.toradex.com/V2.7/zlib-1.2.8.tar.xz to /usr/include/
 - ./tensorflow/contrib/makefile/download_dependencies.sh
 - opkg install python
 - //tensorflow/contrib/makefile/build_all_linux.sh
 - cd tensorflow/contrib/makefile/downloads/protobuf/
 - ./autogen.sh
 - ./configure
 - make
 - sudo make install
 - sudo ldconfig  # refresh shared library cache
 - cd ../../../../..
 - export LD_LIBRARY_PATH=/usr/local/lib
 - make -f tensorflow/contrib/makefile/Makefile HOST_OS=LINUX OPTFLAGS="-L/usr/local/lib -Os -march=armv7-a -mfpu=neon -mfloat-abi=hard -funsafe-math-optimizations -ftree-vectorize"