You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: GUIDE.md
+39-19
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ _[Back to readme](README.md)_
15
15
## Overview
16
16
17
17
These instructions were crafted for a [Raspberry Pi 3 Model B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) running a vanilla copy of Raspbian 8.0 (jessie). It appears to work on Raspberry Pi 2, but [there are some kinks that are being worked out](https://github.com/tensorflow/tensorflow/issues/445#issuecomment-196021885). If these instructions work for different distributions, let me know!
18
+
Updated (2017-09-11) to work with the latest (HEAD) version of tensorflow on Raspbian Strech (Vanilla version september 2017) and Python 3.5.
18
19
19
20
Here's the basic plan: build a RPi-friendly version of [Bazel](https://github.com/bazelbuild/bazel) and use it to build TensorFlow.
20
21
@@ -253,39 +254,58 @@ Once in the directory, we have to write a nifty one-liner that is incredibly imp
253
254
```shell
254
255
grep -Rl 'lib64'| xargs sed -i 's/lib64/lib/g'
255
256
```
257
+
Updating tensorflow/core/platform/platform.h and WORKSPACE as listed in the previous version is no longer needed with the latest version of tensorflow.
258
+
* the IS_MOBILE_PLATFORM check now includes a specific check for the Raspberry
259
+
* numeric/1.2.6 is no longer listed WORKSPACE
256
260
257
-
Next, we need to delete a particular line in `tensorflow/core/platform/platform.h`. Open up the file in your favorite text editor:
261
+
Finally, we have to replace the eigen version dependency. The version included in the current tensorflow version may result in an error (near the end of the build):
258
262
259
263
```shell
260
-
sudo nano tensorflow/core/platform/platform.h
264
+
ERROR: /mnt/tensorflow/tensorflow/core/kernels/BUILD:2128:1: C++ compilation of rule '//tensorflow/core/kernels:svd_op' failed: gcc failed: error executing command
265
+
...com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
266
+
...
267
+
external/eigen_archive/Eigen/src/Jacobi/Jacobi.h:359:55: error: 'struct Eigen::internal::conj_helper<__vector(4) __builtin_neon_sf, Eigen::internal::Packet2cf, false, false>' has no member named 'pmul'
261
268
```
262
269
263
-
Now, scroll down toward the bottom and delete the following line containing `#define IS_MOBILE_PLATFORM` (around line 48):
270
+
to resolve this
264
271
265
-
```cpp
266
-
#elif defined(__arm__)
267
-
#definePLATFORM_POSIX
268
-
...
269
-
#defineIS_MOBILE_PLATFORM <----- DELETE THIS LINE
272
+
```shell
273
+
sudo nano tensorflow/workspace.bzl
270
274
```
271
275
272
-
This keeps our Raspberry Pi device (which has an ARM CPU) from being recognized as a mobile device.
273
-
274
-
Finally, we have to adjust the protocol to access the Numeric JS library- for some reason the Cloudflare security certificates don't work properly over `https`. We'll need to fix this in the Bazel `WORKSPACE` file:
**These options have changed with exception of jemalloc use No for all**
289
309
Now let's configure the build:
290
310
291
311
```shell
@@ -302,7 +322,7 @@ Do you wish to build TensorFlow with OpenCL support? [y/N] N
302
322
Do you wish to build TensorFlow with CUDA support? [y/N] N
303
323
```
304
324
305
-
_Note: if you want to build for Python 3, specify `/usr/bin/python3` for Python's location and `/usr/local/lib/python3.4/dist-packages` for the Python library path._
325
+
_Note: if you want to build for Python 3, specify `/usr/bin/python3` for Python's location and `/usr/local/lib/python3.5/dist-packages` for the Python library path._
306
326
307
327
Bazel will now attempt to clean. This takes a really long time (and often ends up erroring out anyway), so you can send some keyboard interrupts (CTRL-C) to skip this and save some time.
0 commit comments