samjabrahams / tensorflow-on-raspberry-pi

TensorFlow for Raspberry Pi
Other
2.24k stars 496 forks source link

Latest Tensorflow for raspberry pi #153

Open naderafshari opened 6 years ago

naderafshari commented 6 years ago

Tensorflow 1.1 installs an runs fine on raspberry pi - thank you! However. r1.1 does not have some of the useful functions and feature needed for 3d convolutional networks e.g Conv3DTranspose Has there been any attempts to build r1.8 for raspberry pi? I have tried a bunch of stuff but not been successful. For example, latest bazel with tensorflow master - no dice!

varun19299 commented 6 years ago

Have you tried the nightly builds?

On Fri 1 Jun, 2018, 6:13 PM naderafshari, notifications@github.com wrote:

Tensorflow 1.1 installs an runs fine on raspberry pi - thank you! However. r1.1 does not have some of the useful functions and feature needed for 3d convolutional networks e.g Conv3DTranspose Has there been any attempts to build r1.8 for raspberry pi? I have tried a bunch of stuff but not been successful. For example, latest bazel with tensorflow master - no dice!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/samjabrahams/tensorflow-on-raspberry-pi/issues/153, or mute the thread https://github.com/notifications/unsubscribe-auth/AUME5z_apbODxDvAHQdsQNv1qD1mWQ9Jks5t4TcLgaJpZM4UWo48 .

--

Thank you, Varun.

naderafshari commented 6 years ago

There are nightly builds?

varun19299 commented 6 years ago

You can find them here:

http://ci.tensorflow.org/job/nightly-pi-python3/

The current stable build is tensorflow 1.8.

There are benchmark models too, but personally I've tested 1.6 back in March. The benchmarks ran fine. (MNIST, CIFAR on various models).

These are part of the Jenkins project, with rust cross compilation being used. I wonder if Sam (couldn't do a mention, sorry :() should append this to his readme.

MatthewScholefield commented 6 years ago

I just found out about piwheels which when added as an extra pip source you can do a regular pip install tensorflow==1.8.0 on a pi.

naderafshari commented 6 years ago

cool cool cool! pip install tensorflow==1.8.0 --index-url https://www.piwheels.org/simple I had to install a bunch of packages but after that it installed. Thank you so much...

import tensorflow as tf tf.version '1.8.0'

julianhu1979 commented 6 years ago

it seems not working on the Raspbian 9. when using import tensorflow in python3, the system raises an error. Traceback (most recent call last): File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/init.py", line 16, in from . import multiarray ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/dist-packages/tensorflow/init.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/init.py", line 47, in import numpy as np File "/home/pi/.local/lib/python3.5/site-packages/numpy/init.py", line 142, in from . import add_newdocs File "/home/pi/.local/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "/home/pi/.local/lib/python3.5/site-packages/numpy/lib/init.py", line 8, in from .type_check import * File "/home/pi/.local/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in import numpy.core.numeric as _nx File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/init.py", line 26, in raise ImportError(msg) ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try git clean -xdf (removes all files not under version control). Otherwise reinstall numpy.

Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory

MatthewScholefield commented 6 years ago

Try running sudo apt-get install libatlas-base-dev first.

julianhu1979 commented 6 years ago

you are right. I don't what happened, at the beginning, after apt update, I can not install libatlas-base-dev, couple minutes later, it works.