介绍 本页将指导您在raspberry pi 4 64位操作系统bullseye 上安装 tensorflow 2.10.0 或更早版本。
tensorflow是一个专门为深度学习开发的大型软件库。它消耗大量资源。你可以在raspberry pi 4上执行tensorflow,但不要指望奇迹。它可以运行您的模型,如果不是太复杂,但它将无法训练新模型。它也不能执行所谓的迁移学习。除了运行预先构建的深度学习模型外,您还可以使用该库将所谓的冻结 tensorflow 模型转换为 tensorflow lite 平面缓冲区模型。
如果你只是想对深度学习有一些印象,请考虑安装tensorflow lite。它的速度要快得多,使用的资源要少得多,因为它是为raspberry pi等小型计算机设计的。您可以使用许多现成的生成模型。在此处查看我们的 64 位 raspberry 安装指南。
路线图 tensorflow继续增长。每个新版本都需要更多的资源、支持软件和库。它越来越多地给你的树莓派带来了沉重的负担。它解释了为什么最新版本在具有“过时”操作系统的“旧”raspberry pis上不能很好地运行。
另一方面,不建议在最新的bullseye上安装非常旧的tensorflow版本。您将被迫降级某些系统库,这将阻止其他软件运行。这里最好遵循:“顺其自然”。
以下是概述。绿色复选标记表示有版本可用。空的绿色盒子意味着没有版本,但仍然可以安装。灰色框指定不允许“正常”安装的硬件或软件限制。
提示 通常,我们会收到一个问题,如果我们有一个带有预装框架和深度学习示例的 raspberry pi 4 的 sd 图像。
我们很乐意遵守这一要求。请在我们的github页面上找到一个完整的raspberry pi 4,专门用于深度学习。 从我们的gdrive网站下载zip文件,解压缩并在16 gb sd卡上刷新图像,然后开始吧!
我们讨论了两个安装,一个用于 python 3,一个用于 api 库c++。 不幸的是,没有官方的 aarch64 pip3 轮可用于 2.7、2.6 或 2.5 版本。但是,为了您的方便,我们使用 bazel 创建了我们的轮子并将它们放在 github 上。
本指南的最后一部分讨论了keras的安装。
准备 numpy
tensorflow在最新版本的numpy中遇到了问题。将 tensorflow 移植到 numpy 1.20 变得非常困难。现在,随着tensorflow版本2.8.0的出现,它终于成功了。最后,安装tensorflow时不再有numpy版本冲突。
但是,tensorflow 2.7.0仍然报告了一些问题。为了安全起见,请使用 numpy 版本 1.19.5为了tf 2.7.0 以确保一切正常。
libclang 9.0.1
tensorflow 2.7.0 依赖于 libclang 9.0.1。没有适用于 debian 10 的发行版。这就是为什么只有tensorflow 2.7安装在debian11bullseye上,。你可以从头开始在buster rpi上安装libclang 9.0.1,这样你就可以安装tensorflow了。请注意,clang构建需要大量资源,超过5 gb。最好切换到bullseye,并在半小时内启动并运行tensorflow
protobuffer 4.21
最新版本的protobuffer 4.21.0与以前的版本3.20.1相比有一些重大改进。但是,tensorflow尚不支持这些更改。为了使 tensorflow 正常工作,如果您安装了4.21 ,则需要将 protobuf 降级到 3.20版本。
有关如何降级的更多信息,请访问我们的 github 页面。
tensorflow-io-gcs-filesystem
所有依赖项都可以只用一个命令安装,除了 tensorflow-io-gcs 文件系统。由于没有 aarch64 机器的发行版,我们必须从头开始构建 tensorflow-io-gcs 文件系统。整个过程可以在下面找到,应该在安装tensorflow本身之前完成。如果让tensorflow安装io-gcs,它将选择错误的版本并且不起作用。
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# install pip3$ sudo apt-get install git python3-pip# install correct version protobuf$ sudo -h pip3 install --upgrade protobuf==3.20.0method 1# download tensorflow io$ git clone -b v0.23.1 --depth=1 --recursive https://github.com/tensorflow/io.git$ cd io$ python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem$ cd dist$ sudo -h pip3 install tensorflow_io_gcs_filesystem-0.23.1-cp39-cp39-linux_aarch64.whl$ cd ~method 2# or download wheel$ git clone https://github.com/qengineering/tensorflow-io.git$ cd tensorflow-io$ sudo -h pip3 install tensorflow_io_gcs_filesystem-0.23.1-cp39-cp39-linux_aarch64.whl$ cd ~ python 3.9 的 tensorflow wheels
tensorflow由一个名为bazel的google软件安装程序安装。最后,bazel生成一个轮子来安装tensorflow python版本,或者在安装c++版本时生成一个压缩包。这两种方法都是树莓派用户所熟知的。我们已经在github页面上发布了bazel的结果。随意使用这些轮子。整个 tensorflow 安装过程从头到尾需要很多小时(python ±64,c++库±1)。完成所有繁琐的工作后,只需几分钟即可在raspberry 64位bullseye上安装tensorflow。对于很难完成的部分,本手册稍后将介绍完整的程序。
整个快捷方式过程如下。wheels太大,无法存储在github上,因此使用google驱动器代替。
tensorflow 2.10.0
# install gdown to download from google drive$ sudo -h pip3 install gdown# download the wheel$ gdown https://drive.google.com/uc?id=1g2p-fahaxj-uuqaqn_0syjnwbu0ashpd# install tensorflow 2.10.0$ sudo -h pip3 install tensorflow-2.10.0-cp39-cp39-linux_aarch64.whl tensorflow 2.9.1
# install gdown to download from google drive$ sudo -h pip3 install gdown# download the wheel$ gdown https://drive.google.com/uc?id=1xp6erbk85smfnqamuh4ro3jrmdcv_qdu# install tensorflow 2.9.1$ sudo -h pip3 install tensorflow-2.9.1-cp39-cp39-linux_aarch64.whl tensorflow 2.8.0
# install gdown to download from google drive$ sudo -h pip3 install gdown# download the wheel$ gdown https://drive.google.com/uc?id=1ypxnubmel_4egtrvmu-kyyzabtylis29# install tensorflow 2.8.0$ sudo -h pip3 install tensorflow-2.8.0-cp39-cp39-linux_aarch64.whl tensorflow 2.7.0
# utmost important: use only numpy version 1.19.5# check the version first$ pip3 list | grep numpy# if not version 1.19.5, update!$ sudo -h pip3 install numpy==1.19.5# (re)install termcolor at the correct location$ python3 -m pip install termcolor# install gdown to download from google drive$ sudo -h pip3 install gdown# download the wheel$ gdown https://drive.google.com/uc?id=1fdvz1kx5qzgwk2ssgq31c2-cf95qht58# install tensorflow 2.7.0$ sudo -h pip3 install tensorflow-2.7.0-cp39-cp39-linux_aarch64.whl 安装成功后,应获得以下屏幕输出。
tensorflow 2.8.0 c++ api
如果你打算用c++编程,你将需要tensorflow的c++api版本,而不是python版本。使用我们 github 页面中的预构建压缩包安装 c++ 库可以为您节省大量时间。 请按照以下步骤操作。
tensorflow 2.10.0
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# remove old versions (if found)$ sudo rm -r /usr/local/lib/libtensorflow*$ sudo rm -r /usr/local/include/tensorflow# the dependencies$ sudo apt-get install wget curl libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatomic1 libatlas-base-dev zip unzip# install gdown to download from google drive (if not already done)$ sudo -h pip3 install gdown# download the tarball$ gdown https://drive.google.com/uc?id=1goc5cit5ws2npibem4k3g3frqmgdrcl7# unpack the ball$ sudo tar -c /usr/local -xzf libtensorflow_cp39_64os_2_10_0.tar.gz tensorflow 2.9.1
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# remove old versions (if found)$ sudo rm -r /usr/local/lib/libtensorflow*$ sudo rm -r /usr/local/include/tensorflow# the dependencies$ sudo apt-get install wget curl libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatomic1 libatlas-base-dev zip unzip# install gdown to download from google drive (if not already done)$ sudo -h pip3 install gdown# download the tarball$ gdown https://drive.google.com/uc?id=1z83_rqtvcb2jl2bo1zdez3x4qx-xherk# unpack the ball$ sudo tar -c /usr/local -xzf libtensorflow_cp39_64os_2_9_1.tar.gz tensorflow 2.8.0
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# remove old versions (if found)$ sudo rm -r /usr/local/lib/libtensorflow*$ sudo rm -r /usr/local/include/tensorflow# the dependencies$ sudo apt-get install wget curl libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatomic1 libatlas-base-dev zip unzip# install gdown to download from google drive (if not already done)$ sudo -h pip3 install gdown# download the tarball$ gdown https://drive.google.com/uc?id=1dmjkik8lui_xczlvnrgl-uvfvfrirmcg# unpack the ball$ sudo tar -c /usr/local -xzf libtensorflow_cp39_64os_2_8_0.tar.gz tensorflow 2.7.0
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# remove old versions (if found)$ sudo rm -r /usr/local/lib/libtensorflow*$ sudo rm -r /usr/local/include/tensorflow# the dependencies$ sudo apt-get install wget curl libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatomic1 libatlas-base-dev zip unzip# install gdown to download from google drive (if not already done)$ sudo -h pip3 install gdown# download the tarball$ gdown https://drive.google.com/uc?id=1kscckyj0pr265xbcgymxqxs77xjfe6p1# unpack the ball$ sudo tar -c /usr/local -xzf libtensorflow_cp39_64os_2_7_0.tar.gz 你最终应该将 tensorflow 库安装在 /usr/local/lib 位置,并将头文件安装在文件夹 usr/local/include/tensorflow/c 中。
从头开始安装 内存交换大小
构建完整的 tensorflow 2.8 包需要超过 6 gb 的 ram。如果您有具有8 gb ram的raspberry pi 4,那么您就很清楚了。否则,请确保增加交换大小以满足此需求。板载 4 gb ram,zram 可以提供额外的 2 gb。有了 2 gb 的 ram,您就不能再依靠 zram 来压缩超过 2 倍。在这种情况下,他们必须重新安装dphys-swapfile才能从sd卡中获取额外的空间。如果您必须安装 dphys-swapfile,请按照以下命令操作。在 bullseye 操作系统上设置交换空间时,完成重启需要相当长的时间。
# install dphys-swapfile$ sudo apt-get install dphys-swapfile# give the required memory size$ sudo nano /etc/dphys-swapfile# reboot afterwards$ sudo reboot 如果一切顺利,你应该有这样的东西。
作为记录,显示的数字是dphys-swapfile和zram分配的交换空间总量。请不要忘记在完成后删除dphys-swapfile。
注意:如果在同时启用 zram 和 dphys-swapfile 的情况下重新启动 raspberry pi,zram 将在启动期间禁用 dphys-swapfile。您必须手动重新激活此服务。
# reactivate dphys-swapfile after a reboot# (when zram and dphys-swapfile are both enabled)$ sudo /etc/init.d/dphys-swapfile stop$ sudo /etc/init.d/dphys-swapfile start bazel
bazel是google的免费软件工具,用于自动构建和测试软件包。你可以将它与opencv使用的cmake进行比较,但后者只构建软件,没有测试工具。bazel是用java编写的,java是一种独立于平台的语言,在语法方面主要基于c++。要编译 bazel,我们必须首先使用以下命令安装 java 和其他一些依赖项。
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# install pip and pip3$ sudo apt-get install python3-pip# install some tools$ sudo apt-get install zip unzip curl# install java$ sudo apt-get install openjdk-11-jdk 接下来,我们可以下载并解压缩 bazel 软件。我们需要 tensorflow 2.1.0 的 bazel 版本 5.1.1,因此请确保安装正确的版本。
$ wget https://github.com/bazelbuild/bazel/releases/download/5.1.1/bazel-5.1.1-dist.zip$ unzip -d bazel bazel-5.1.1-dist.zip$ cd bazel 在安装过程中,bazel 使用预定义的可用工作内存比率。由于树莓派的 ram 大小有限,这个比例太小了。为防止崩溃,我们必须将此内存的大小定义为最大板载 ram 的 40%。例如,800 mb用于2 gbyte ram raspberry pi。这是通过在脚本文件 compile.sh 中添加一些额外信息来完成的。您可以将文本 -j-xmx800m 添加到以 run 开头的行中。 (第 144 行左右)。请参阅下面的屏幕。使用众所周知的、、保存更改(请参阅上面的幻灯片放映)。
$ nano scripts/bootstrap/compile.sh -c 一旦 bazel 的 java 环境最大化,您就可以使用下一个命令开始构建 bazel 软件。完成后,将二进制文件复制到 /usr/local/bin 位置,以便 bash 可以在任何地方找到可执行文件。最后一个操作是删除 zip 文件。整个构建大约需要 33 分钟。
# start the build$ env extra_bazel_args=--host_javabase=@local_jdk//:jdk bash ./compile.sh# copy the binary$ sudo cp output/bazel /usr/local/bin/bazel# clean up$ cd ~$ rm bazel-5.1.1-dist.zip# if you have a copied bazel to /usr/local/bin you may also# delete the whole bazel directory, freeing another 500 mbyte$ sudo rm -rf bazel 安装 tensorflow for python 3
随着bazel的启动和运行,我们可以开始在64位raspberry pi for python 3上构建tensorflow 2.10.0。这几乎正在成为标准做法。首先,安装一些依赖项,然后从 github 下载 zip,最后解压缩软件。您还必须安装 tensorflow_io_gcs 文件系统。它是通过使用我们的 github 存储库中的预编译轮来完成的。
tensorflow 2.10.0
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# the dependencies$ sudo apt-get install zip unzip$ sudo -h pip3 install keras_applications --no-deps$ sudo -h pip3 install keras_preprocessing --no-deps# install correct version protobuf$ sudo -h pip3 install --upgrade protobuf==3.20.0# download tensorflow io$ git clone https://github.com/qengineering/tensorflow-io.git$ cd tensorflow-io$ sudo -h pip3 install tensorflow_io_gcs_filesystem-0.23.1-cp39-cp39-linux_aarch64.whl$ cd ~# download tensorflow 2.10.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.10.0.zip$ unzip tensorflow.zip$ cd tensorflow-2.10.0$ ./configure tensorflow 2.9.1
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# the dependencies$ sudo apt-get install zip unzip$ sudo -h pip3 install keras_applications --no-deps$ sudo -h pip3 install keras_preprocessing --no-deps# install correct version protobuf$ sudo -h pip3 install --upgrade protobuf==3.20.0# download tensorflow io$ git clone https://github.com/qengineering/tensorflow-io.git$ cd tensorflow-io$ sudo -h pip3 install tensorflow_io_gcs_filesystem-0.23.1-cp39-cp39-linux_aarch64.whl$ cd ~# download tensorflow 2.9.1$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.9.1.zip$ unzip tensorflow.zip$ cd tensorflow-2.9.1$ ./configure tensorflow 2.8.0
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# the dependencies$ sudo apt-get install zip unzip$ sudo -h pip3 install keras_applications --no-deps$ sudo -h pip3 install keras_preprocessing --no-deps# install correct version protobuf$ sudo -h pip3 install --upgrade protobuf==3.20.0$ cd ~# download tensorflow 2.8.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.8.0.zip$ unzip tensorflow.zip$ cd tensorflow-2.8.0$ ./configure tensorflow 2.7.0
# get a fresh start$ sudo apt-get update$ sudo apt-get upgrade# the dependencies$ sudo apt-get install zip unzip$ sudo -h pip3 install keras_applications --no-deps$ sudo -h pip3 install keras_preprocessing --no-deps# download tensorflow 2.7.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.7.0.zip$ unzip tensorflow.zip$ cd tensorflow-2.7.0$ ./configure 构建 python 3 安装轮之前的最后一步是使用一些环境变量配置构建。这是由 ./configure 脚本文件完成的。将 python 3 定义为默认的 python 版本,对所有其他问题定义为“否”。
pi@raspberrypi:~/tensorflow-2.10.0 $ ./configureyou have bazel 5.1.1- (@non-git) installed.please specify the location of python. [default is /usr/bin/python3]: found possible python library paths: /usr/lib/python3/dist-packages /usr/local/lib/python3.9/dist-packagesplease input the desired python library path to use. default is [/usr/lib/python3/dist-packages] do you wish to build tensorflow with rocm support? [y/n]: nno rocm support will be enabled for tensorflow.do you wish to build tensorflow with cuda support? [y/n]: nno cuda support will be enabled for tensorflow.do you wish to download a fresh release of clang? (experimental) [y/n]: nclang will not be downloaded.please specify optimization flags to use during compilation when bazel option --config=opt is specified [default is -wno-sign-compare]: would you like to interactively configure ./workspace for android builds? [y/n]: nnot configuring the workspace for android builds.preconfigured bazel build configs. you can use any of the below by adding --config= to your build command. see .bazelrc for more details.--config=mkl # build with mkl support.--config=mkl_aarch64 # build with onednn and compute library for the arm architecture (acl).--config=monolithic # config for mostly static monolithic build.--config=numa # build with numa support.--config=dynamic_kernels # (experimental) build kernels into separate shared objects.--config=v2 # build tensorflow 2.x instead of 1.x.preconfigured bazel build configs to disable default on features:--config=noaws # disable aws s3 filesystem support.--config=nogcp # disable gcp support.--config=nohdfs # disable hdfs support.--config=nonccl # disable nvidia nccl support.configuration finished 脚本文件现已全部设置完毕,可以使用以下命令开始大规模构建。-xmx1624m 设置运行 bazel 的 java 环境的内存大小。给它尽可能多的空间。我们建议 80% 的树莓派内存大小。在我们的例子中,我们有 2 gb 板载,所以 1624 mb 为除 bazel 之外的其他线程留下了足够的空间。
另一点是basel 使用的内核数量。最好使用一个内核。运行慢一点比崩溃好一点(总是在最后)并重新开始。
在生成过程中关闭所有其他应用程序。运行的其他进程越少,编译速度就越快。
$ sudo bazel clean$ sudo bazel --host_jvm_args=-xmx1624m build --config=opt --config=noaws --config=nogcp --config=nohdfs --config=nonccl --config=monolithic --config=v2 --local_cpu_resources=1 --define=tflite_pip_with_flex=true --copt=-ftree-vectorize --copt=-funsafe-math-optimizations --copt=-ftree-loop-vectorize --copt=-fomit-frame-pointer //tensorflow/tools/pip_package:build_pip_package 经过 41 小时(或更长时间!)编译后,您将看到以下屏幕。
现在我们必须生成wheel并安装它。这是通过以下命令完成的。安装大约只需几分钟。
tensorflow 2.10.0
# synthesize the wheel$ sudo bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg$ cd ~# go to the folder where the wheel is located and install tensorflow$ cd /tmp/tensorflow_pkg$ sudo -h pip3 install tensorflow-2.10.0-cp39-cp39-linux_aarch64.whl tensorflow 2.9.1
# synthesize the wheel$ sudo bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg$ cd ~# go to the folder where the wheel is located and install tensorflow$ cd /tmp/tensorflow_pkg$ sudo -h pip3 install tensorflow-2.9.1-cp39-cp39-linux_aarch64.whl tensorflow 2.8.0
# synthesize the wheel$ sudo bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg$ cd ~# go to the folder where the wheel is located and install tensorflow$ cd /tmp/tensorflow_pkg$ sudo -h pip3 install tensorflow-2.8.0-cp39-cp39-linux_aarch64.whl tensorflow 2.7.0
# synthesize the wheel$ sudo bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg$ cd ~# go to the folder where the wheel is located and install tensorflow$ cd /tmp/tensorflow_pkg$ sudo -h pip3 install tensorflow-2.7.0-cp39-cp39-linux_aarch64.whl 安装 tensorflow c++ api
如前所述,您可以使用 github 页面上的压缩包非常快速地安装 tensorflow c++ api;不需要经过漫长的安装过程。 对于那些想要自己构建 api 的人,现在遵循安装指南。
首先,如果尚未安装 bazel。该过程也在上面描述。一旦 bazel 开始工作,你可以安装依赖项并下载 tensorflow,如果之前还没有为 python 3 安装完成的话。
tensorflow 2.10.0
# the dependencies$ sudo apt-get install build-essential make cmake wget zip unzip$ sudo apt-get install libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatlas-base-dev# download tensorflow 2.10.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.10.0.zip# unpack the folder$ unzip tensorflow.zip$ cd tensorflow-2.10.0$ ./configure tensorflow 2.9.1
# the dependencies$ sudo apt-get install build-essential make cmake wget zip unzip$ sudo apt-get install libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatlas-base-dev# download tensorflow 2.10.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.10.0.zip# unpack the folder$ unzip tensorflow.zip$ cd tensorflow-2.10.0$ ./configure tensorflow 2.8.0
# the dependencies$ sudo apt-get install build-essential make cmake wget zip unzip$ sudo apt-get install libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatlas-base-dev# download tensorflow 2.8.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.8.0.zip# unpack the folder$ unzip tensorflow.zip$ cd tensorflow-2.8.0$ ./configure tensorflow 2.7.0
# the dependencies$ sudo apt-get install build-essential make cmake wget zip unzip$ sudo apt-get install libhdf5-dev libc-ares-dev libeigen3-dev$ sudo apt-get install libatlas-base-dev# download tensorflow 2.7.0$ wget -o tensorflow.zip https://github.com/tensorflow/tensorflow/archive/v2.7.0.zip# unpack the folder$ unzip tensorflow.zip$ cd tensorflow-2.7.0$ ./configure 同样,我们需要在实际构建开始之前配置 bazel。尽管我们要构建一个c++ api,但bazel脚本文件需要设置为python 3作为默认python版本,而所有其他问题则需要设置为“否”。 回答脚本文件的所有问题后,您最终会得到与上所示相同的输出屏幕。
最后一步是命令行及其选项。同样,与之前使用的几乎相同。这里最重要的是 --config=monolithic 标志。没有这个方向,tensorflow将无法与opencv一起使用,反之亦然。就像pip编译一样,java环境(-xmx1624m)的内存必须最大化到raspberry pi板载内存的80%。 最后一行表示压缩包库构建,而不是pip wheel。
$ sudo bazel --host_jvm_args=-xmx1624m build --config=opt --config=noaws --config=nogcp --config=nohdfs --config=nonccl --config=monolithic --config=v2 --local_cpu_resources=1 --copt=-ftree-vectorize --copt=-funsafe-math-optimizations --copt=-ftree-loop-vectorize --copt=-fomit-frame-pointer //tensorflow/tools/lib_package:libtensorflow 经过漫长的 12 个小时等待,您将看到以下屏幕。
最后一步是安装压缩包。这是通过以下命令完成的。
$ sudo tar -c /usr/local -xzf bazel-bin/tensorflow/tools/lib_package/libtensorflow.tar.gz 安装后,您必须具有相同的文件夹(/usr/local/lib 和 usr/local/include/tensorflow/c),如本页开头所示。
清除
成功安装后,不再需要许多文件。bazel 生成的中间对象文件占用大约 6 gb 的磁盘。删除不会造成任何伤害。
# clean up the whole bazel cache$ sudo rm -rf ~/.cache/bazel 如果您必须重新安装 dphys-swapfile,是时候再次卸载它了。这样,您将延长sd卡的使用寿命。
现在的中端手机不香了?看完OPPOA95的真实口碑你就知道了
【Docker】命令使用大全
14岁女生戴耳机损伤听力,我们该如何使用耳机保护自己的耳朵?
产品应用 | 浅谈进芯电子高性能电钻控制板方案
新一代乐视超级电视即将面世 Letv智能终端保有量仍旧超过1200万台
在树莓派64位上安装TensorFlow
过零检测电路工作原理及各元器件作用及注意事项
智能驾驶汽车被企业聚焦 特斯拉入局会有何改变
选购压力变送器需要注意什么
大功率射频模块在SUB-1G方案中的应用
UltraSoC锁定500万英镑投资迎接信息安全、和高安全性系统市场新机遇
30V/3A稳压稳流电源电路原理
java数据量大了怎么处理
欧盟或对华电动汽车启动“反倾销调查”
灌区取水计量设备解决方案
iOS 14 你升级了吗
电源管理系统是各种电子设备的关键所在
电力调整器怎么接线
天猫超级粉丝日开启 争当荣耀“屏荐官”送新品手机
国芯思辰 |第二代碳化硅MOSFET B2M065120H助力光储一体机