install
for python 2.7
sudo apt-get update
sudo apt-get install python-pip python-dev
wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v1.1.0/tensorflow-1.1.0-cp27-none-linux_armv7l.whl sudo pip install tensorflow-1.1.0-cp27-none-linux_armv7l.whl
sudo pip install tensorflow-1.1.0-cp27-none-linux_armv7l.whl
sudo pip uninstall mock
sudo pip install mock
for python 3.3+
sudo apt-get update
sudo apt-get install python3-pip python3-dev
wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v1.0.1/tensorflow-1.0.1-cp34-cp34m-linux_armv7l.whl
sudo pip3 install tensorflow-1.0.1-cp34-cp34m-linux_armv7l.whl
sudo pip3 uninstall mock
sudo pip3 install mock
test
python
import tensorflow as tf
hello = tf.constant("Hello, TensorFlow!")
sess = tf.Session()
print(sess.run(hello))
Ctrl-D 退出
test
git clone https://github.com/samjabrahams/models.git
FileZilla: models -> /home/pi/tensorflow_test
wget http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz
tar xf inception-2015-12-05.tgz
python /home/pi/tensorflow_test/models/tutorials/image/imagenet/classify_image.py –-image_file cropped_panda.jpg