{"id":10007035,"date":"2023-01-03T17:26:43","date_gmt":"2023-01-03T09:26:43","guid":{"rendered":"https:\/\/ityet.com\/?p=10007035"},"modified":"2023-01-03T17:26:43","modified_gmt":"2023-01-03T09:26:43","slug":"%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e6%9e%84%e5%bb%batensorflow%e6%b5%81%e7%a8%8b%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10007035","title":{"rendered":"\u4ece\u6e90\u4ee3\u7801\u6784\u5efaTensorFlow\u6d41\u7a0b\u8bb0\u5f55"},"content":{"rendered":"<h6>\u4eac\u4e1c\u79d1\u6280\u9690\u79c1\u8ba1\u7b97\u4ea7\u54c1\u90e8 \u66f9\u96e8\u6668<\/h6>\n<h2>\u4e3a\u4ec0\u4e48\u4ece\u6e90\u4ee3\u7801\u6784\u5efa<\/h2>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u76f4\u63a5\u5b89\u88c5\u6784\u5efa\u597d\u7684.whl\u5373\u53ef\u3002\u4e0d\u8fc7\uff0c\u5f53\u9700\u8981\u4e00\u4e9b\u7279\u6b8a\u914d\u7f6e\uff08\u6216\u8005\u95f2\u6765\u65e0\u4e8b\u60f3\u4f53\u4f1a TensorFlow \u6784\u5efa\u8fc7\u7a0b\u5230\u5e95\u6709\u591a\u9ebb\u70e6\uff09\u7684\u65f6\u5019\uff0c\u5219\u9700\u8981\u9009\u62e9\u4ece\u6e90\u4ee3\u7801\u6784\u5efaTensorFlow\u3002\u4e07\u5e78\u6587\u6863\u6df7\u4e71\u7684 TensorFlow \u8fd8\u662f\u597d\u5fc3\u5730\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u6574\u9875\u7684\u6587\u6863\u4f9b\u53c2\u8003 <a href=\"https:\/\/link.segmentfault.com\/?enc=yPuimsXjWBa%2BDmIxvjilVQ%3D%3D.l2V6kf%2BHj8BfEeTDjmsZRjLnF8XSImVaAggr1pnA0NpxEHaO9HG7g9B6mkRqGMPpz%2F2feGMsWgrNC2Fuw47WnQ%3D%3D\" rel=\"nofollow\">https:\/\/www.tensorflow.org\/in&#8230;<\/a> \uff0c\u4e2a\u4eba\u8ba4\u4e3a\u5176\u4e2d\u6700\u9700\u8981\u5173\u6ce8\u7684\u90e8\u5206\u83ab\u8fc7\u4e8e\u7ecf\u8fc7\u6d4b\u8bd5\u4f9b\u53c2\u8003\u7684\u6e90\u914d\u7f6e\uff08\u5217\u4e8e\u6587\u672b\uff09\u3002TF\u4f7f\u7528 Google \u7684\u5f00\u6e90\u6784\u5efa\u5de5\u5177 bazel \u6784\u5efa\uff0c\u5e76\u4e14\u6e90\u7801\u7684\u7248\u672c\u4e0e bazel \u7684\u7248\u672c\u9ad8\u5ea6\u76f8\u5173\uff0c\u6240\u4ee5\u5c3d\u91cf\u5339\u914d\u7248\u672c\u8fdb\u884c\u6784\u5efa\u3002<\/p>\n<h2>\u6d41\u7a0b\u8bb0\u5f55 TF v1.14.0 CPU on Ubuntu 18.04<\/h2>\n<h3>\u5b89\u88c5\u5bf9\u5e94\u7248\u672c\u7684 bazel<\/h3>\n<p>\u6839\u636e\u8ba1\u5212\u6784\u5efa\u7684\u7248\u672c\uff0c\u67e5\u9605\u6587\u672b\u7684\u5bf9\u5e94\u914d\u7f6e\uff0c\u53c2\u8003\u5b98\u65b9\u6587\u6863\uff1a <a href=\"https:\/\/link.segmentfault.com\/?enc=hxyAABvwTN%2FX58Y%2BQGorhg%3D%3D.LNrbFGHpC%2F9g5cS2mIkKeh7kiBqcsI9cGLIHdOLZsI3A7cOBEMXigvg%2BqLNIWkOi\" rel=\"nofollow\">https:\/\/bazel.build\/install\/u&#8230;<\/a> \u5b89\u88c5\u76f8\u5e94\u7248\u672c\u7684 bazel\uff0c\u5982\u672c\u6b21\u8ba1\u5212\u6784\u5efa\u7684\u7248\u672c\u662f v1.14.0\uff0c\u5bf9\u5e94\u7684 bazel \u7248\u672c\u662f 0.24.1(\u6b64\u6b21\u4f7f\u75280.26.1\u4e5f\u662f\u53ef\u4ee5\u7684)\u3002<\/p>\n<p>\u4e3a\u65b9\u4fbf\uff0c\u8fd9\u91cc\u76f4\u63a5\u8d34\u51fa\u5bf9\u5e94 0.26.1 release \u7684\u9875\u9762\uff1a <a href=\"https:\/\/link.segmentfault.com\/?enc=%2F%2BMxipr2tUQdSdIeBeIK7g%3D%3D.s%2BFoLy4PcjZ%2Fiq4UHdT6fhSpCtLtwqZ9kV55MZG%2Bfrv3MRPlSCzYGWBakf6LLJ8aaDtOiQ5%2BrrtTSDOg4cb1XPRc1v2QqQ7fbcWoIxPh5UU%3D\" rel=\"nofollow\">https:\/\/github.com\/bazelbuild&#8230;<\/a> \uff0c\u70b9\u51fbassets\u627e\u5230\u5bf9\u5e94\u7684\u6587\u4ef6\u4e0b\u8f7d\u5373\u53ef\u3002<\/p>\n<pre><code>wget https:\/\/github.com\/bazelbuild\/bazel\/releases\/download\/0.26.1\/bazel-0.26.1-installer-linux-x86_64.sh\nchmod +x bazel-version-installer-linux-x86_64.sh\n.\/bazel-version-installer-linux-x86_64.sh --user<\/code><\/pre>\n<h3>\u514b\u9686 TensorFlow \u4ed3\u5e93<\/h3>\n<p>\u4ece Github \u4e0a <code>clone<\/code> \u6e90\u7801\u4ed3\u5e93<\/p>\n<pre><code>git clone https:\/\/github.com\/tensorflow\/tensorflow <\/code><\/pre>\n<p><code>cd<\/code> \u5230\u4ed3\u5e93\u76ee\u5f55\u5e76 <code>git checkout<\/code>\u5230\u76f8\u5e94 tag\uff0c\u6bd4\u5982\u8fd9\u6b21\u662f\u6784\u5efa v1.14.0 \u7248\u672c\uff1a<\/p>\n<pre><code>git checkout v1.14.0<\/code><\/pre>\n<h3>* \u4e00\u4e9b\u5c0f\u8c03\u6574\uff0c\u901a\u5e38\u53ef\u4ee5\u7565\u8fc7<\/h3>\n<h4>Build with C++17<\/h4>\n<p>\u56e0\u4e3a\u4e4b\u540e\u9700\u8981\u5199\u7684 Custom OP \u4f9d\u8d56\u7684\u53e6\u4e00\u4e2a\u5e93\u662f C++17\uff0c\u800c\u9664\u4e86\u521a\u521a\u624d\u53d1\u5e03\u7684 v2.10 \u7248\uff0c\u4ee5\u524d\u7684 TF\u9ed8\u8ba4\u662f\u4f7f\u7528 C++11\uff0c\u5b9e\u9645\u6784\u5efa\u7684\u65f6\u5019\uff0c\u4ee3\u7801\u6709\u4e00\u4e9b minor fix\u3002\u6b64\u5904\u53c2\u8003 <a href=\"https:\/\/link.segmentfault.com\/?enc=Y4DPXLZZOhxFeJMmR3hMwQ%3D%3D.a0inhEDNWkHRRQ0V9jd69GRKHePXWbsnJWYucrjTzQ67XZuQ%2BBWNY94wqkub6LanUdYfgjN%2BimeAvEcMB1p5dA%3D%3D\" rel=\"nofollow\">https:\/\/github.com\/tensorflow&#8230;<\/a> \u4fee\u6539 <code> .bazelrc  <\/code>\u91cc <code>build:c++17<\/code> \u7684\u914d\u7f6e\uff0c\u5728 <code>tensorflow\/core\/lib\/gif\/gif_io.cc<\/code> \u4e2d\u6dfb\u52a0 <code>#include&lt;cstring&gt;<\/code>, \u5e76\u5728 <code>tensorflow\/stream_executor\/stream_executor_pimpl.h<\/code> \u4e2d\u6dfb\u52a0 <code>#include &quot;absl\/memory\/memory.h&quot;<\/code>\uff08\u5426\u5219 compile \u65f6\u4f1a\u62a5\u9519\u627e\u4e0d\u5230 <code>absl::make_unique<\/code>\uff09\uff08\u8fd9\u91cc make_unique \u662f C++17 \u6807\u51c6\u5e93\u91cc\u7684\u7528\u6cd5\uff0cGoogle\u7684abseil\u7684make_unique\u65b9\u6cd5\u5219\u65b9\u4fbfC++11\u7684\u4ee3\u7801\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b83\uff1b\u6700\u65b0\u7684v2.10\u7248\u7531\u4e8e\u9ed8\u8ba4\u4f7f\u7528C++17\uff0c\u5df2\u7ecf\u6539\u4e3astd::make_unique\uff09<\/p>\n<p><code> .bazelrc  <\/code>\u6587\u4ef6\u91cc\u8bb0\u5f55\u4e86\u6784\u5efa\u65f6\u5404\u79cd\u914d\u7f6e\u9009\u9879 \uff08<code>[--config=option]<\/code>\uff09\u7684\u6620\u5c04\u89c4\u5219\uff0c\u5982\u6709\u9700\u8981\u53ef\u4ee5\u8fdb\u884c\u4fee\u6539\u3002\u7531\u4e8e GCC \u4e0d\u652f\u6301<code>--stdlib<\/code>\u547d\u4ee4\uff0c\u6b64\u6b21\u4fee\u6539\u5982\u4e0b\uff1a<\/p>\n<pre><code>  # Build TF with C++ 17 features.\n- build:c++17 --cxxopt=-std=c++1z\n- build:c++17 --cxxopt=-stdlib=libc++\n+ build:c++17 --cxxopt=-std=c++17<\/code><\/pre>\n<h4>\u7f51\u7edc\u4e0d\u901a<\/h4>\n<p>Bazel \u5728\u6784\u5efa\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u73b0\u62c9\u53d6\u8fdc\u7a0b\u4ed3\u5e93\u7684\u8bb8\u591a\u4f9d\u8d56\u3002\u7531\u4e8e TF \u7684\u6784\u5efa\u8fc7\u7a0b\u6d88\u8017\u5185\u5b58\u5f88\u4e25\u91cd\uff0c\u9009\u62e9\u5728\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u6784\u5efa\uff0c\u800c\u670d\u52a1\u5668\u8fdc\u7a0b\u62c9\u53d6 github \u4e0a\u4ed3\u5e93\u7ecf\u5e38\u5931\u8d25\u3002\u6240\u4ee5\u9700\u8981\u624b\u52a8\u5728\u7f51\u7edc\u826f\u597d\u7684\u673a\u5668\u4e0a\u4e0b\u8f7d\u76f8\u5e94\u7684\u5e93\u7684 release \uff08\u5bf9\u5e94\u7684\u7248\u672c\u5728 <code>WORKSPACE<\/code> \u6587\u4ef6\u4e2d\u53ef\u4ee5\u627e\u5230\u4e00\u884c\u6ce8\u91ca\uff09\uff0c\u5b58\u653e\u5728\u670d\u52a1\u5668\u672c\u5730\uff0c\u5e76\u5728 WORKSPACE \u6587\u4ef6\u4e2d\u5bf9\u5e94\u7684 <code>http_archive<\/code> \u90e8\u5206\u6dfb\u52a0\u4e00\u884c\u672c\u5730\u5730\u5740\u3002\u82e5\u9700\u8981\u6362\u7248\u672c\uff0c\u4e5f\u53ef\u4ee5\u5728\u76f8\u5e94github\u5e93\u7684releases\u4e0b\u9762\u627e\u5230\u5bf9\u5e94\u7684 URL \u53ca sha256\uff08\u5b9e\u5728\u662f\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u4e5f\u53ef\u4ee5\u624b\u52a8\u4e0b\u8f7d\u538b\u7f29\u5305\u540e\u901a\u8fc7 <code>shasum256<\/code> \u547d\u4ee4\u83b7\u53d6\uff09<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre><code>http_archive(\n name = &quot;build_bazel_rules_apple&quot;,\n sha256 = &quot;a045a436b642c70fb0c10ca84ff0fd2dcbd59cc89100d597a61e8374afafb366&quot;,\n urls = [&quot;https:\/\/github.com\/bazelbuild\/rules_apple\/releases\/download\/0.18.0\/rules_apple.0.18.0.tar.gz&quot;,\n         &quot;file:\/\/\/opt\/tensorflow_build_deps\/rules_apple.0.18.0.tar.gz&quot;],\n) # https:\/\/github.com\/bazelbuild\/rules_apple\/releases<\/code><\/pre>\n<h3>\u914d\u7f6e build<\/h3>\n<p>\u8fd0\u884c\u6e90\u7801\u6839\u76ee\u5f55\u4e0b\u7684 .\/configure \u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<pre><code>.\/configure<\/code><\/pre>\n<p>\u6b64\u6b21\u7f16\u8bd1\u4e00\u4e2a\u5c3d\u91cf\u7b80\u7565\u7684 CPU \u7248\u672c\uff0c\u4f1a\u8bdd\u5982\u4e0b\uff1a<\/p>\n<pre><code>WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command &quot;bazel shutdown&quot;.\nYou have bazel 0.26.1 installed.\nPlease specify the location of python. [Default is \/usr\/local\/bin\/python]:\n \n \nFound possible Python library paths:\n  \/usr\/local\/lib\/python3.6\/dist-packages\n  \/usr\/lib\/python3\/dist-packages\nPlease input the desired Python library path to use.  Default is [\/usr\/local\/lib\/python3.6\/dist-packages]\n \nDo you wish to build TensorFlow with XLA JIT support? [Y\/n]: n\nNo XLA JIT support will be enabled for TensorFlow.\n \nDo you wish to build TensorFlow with OpenCL SYCL support? [y\/N]: n\nNo OpenCL SYCL support will be enabled for TensorFlow.\n \nDo you wish to build TensorFlow with ROCm support? [y\/N]: n\nNo ROCm support will be enabled for TensorFlow.\n \nDo you wish to build TensorFlow with CUDA support? [y\/N]: n\nNo CUDA support will be enabled for TensorFlow.\n \nDo you wish to download a fresh release of clang? (Experimental) [y\/N]: n\nClang will not be downloaded.\n \nPlease specify optimization flags to use during compilation when bazel option &quot;--config=opt&quot; is specified [Default is -march=native -Wno-sign-compare]:\n \n \nWould you like to interactively configure .\/WORKSPACE for Android builds? [y\/N]: n\nNot configuring the WORKSPACE for Android builds.\n \nPreconfigured Bazel build configs. You can use any of the below by adding &quot;--config=&lt;&gt;&quot; to your build command. See .bazelrc for more details.\n    --config=mkl            # Build with MKL support.\n    --config=monolithic     # Config for mostly static monolithic build.\n    --config=ngraph         # Build with Intel nGraph support.\n    --config=numa           # Build with NUMA support.\n    --config=dynamic_kernels    # (Experimental) Build kernels into separate shared objects.\n    --config=v2             # Build TensorFlow 2.x instead of 1.x.\nPreconfigured Bazel build configs to DISABLE default on features:\n    --config=noaws          # Disable AWS S3 filesystem support.\n    --config=nogcp          # Disable GCP support.\n    --config=nohdfs         # Disable HDFS support.\n    --config=nonccl         # Disable NVIDIA NCCL support.\nConfiguration finished<\/code><\/pre>\n<h3>\u6784\u5efa pip \u8f6f\u4ef6\u5305\u5e76\u5b89\u88c5<\/h3>\n<p>\u5b98\u65b9\u63d0\u4f9b\u7684\u547d\u4ee4\uff1a<\/p>\n<pre><code>bazel build [--config=option] \/\/tensorflow\/tools\/pip_package:build_pip_package<\/code><\/pre>\n<p>\u672c\u6b21\u4f7f\u7528\uff1a<\/p>\n<pre><code>bazel build --config=c++17 --config=c++1z --jobs=6 \/\/tensorflow\/tools\/pip_package:build_pip_package<\/code><\/pre>\n<p>\u5176\u4e2d\u4f7f\u7528\u7684 <code>--config=c++17 --config=c++1z<\/code> \u5bf9\u5e94\u521a\u521a\u4fee\u6539\u7684 .bazelrc \u6587\u4ef6\u4e2d\u76f8\u5e94\u7684\u90e8\u5206<\/p>\n<p>\u6ce8\u610f\uff1a<code>bazel build<\/code> \u7684\u8fc7\u7a0b\u65f6\u95f4\u4f1a\u6bd4\u8f83\u957f\uff0c\u5bf9\u5185\u5b58\u7684\u6d88\u8017\u8f83\u5927\uff0cjobs \u6570\u8c28\u614e\u5f00\u5927\u3002<\/p>\n<p><code> bazel build  <\/code>\u7ed3\u675f\u540e\uff0c\u4e00\u4e2a\u540d\u4e3a<code>  build_pip_package <\/code> \u7684\u53ef\u6267\u884c\u6587\u4ef6\u5c31\u521b\u5efa\u597d\u4e86\uff0c\u63a5\u4e0b\u6765\u53ef\u4ee5\u6267\u884c\uff1a<\/p>\n<pre><code>.\/bazel-bin\/tensorflow\/tools\/pip_package\/build_pip_package \/tmp\/tensorflow_pkg<\/code><\/pre>\n<p>\u5982\u679c\u5e0c\u671b\u6784\u5efa\u7684<code>whl<\/code>\u540d\u4e3a <code>tf-nightly<\/code> \u7248\u672c\uff0c\u5219\u53ef\u4ee5\u52a0\u4e0a <code> --nightly_flag  <\/code>\u7684\u9009\u9879\u3002<\/p>\n<pre><code>.\/bazel-bin\/tensorflow\/tools\/pip_package\/build_pip_package --nightly_flag \/tmp\/tensorflow_pkg<\/code><\/pre>\n<p>\u6b64\u540e\u4fbf\u83b7\u5f97\u4e86<code>  .whl  <\/code>\u6587\u4ef6\uff0c\u901a\u8fc7 pip \u5b89\u88c5\u5373\u53ef\uff1a<\/p>\n<pre><code>pip install \/tmp\/tensorflow_pkg\/tensorflow-[version]-[tags].whl<\/code><\/pre>\n<p>\u5176\u4e2d\uff0c<code>version<\/code>\u662f\u5bf9\u5e94\u7684\u7248\u672c\uff0c<code>tags<\/code>\u4e0e\u7cfb\u7edf\u6709\u5173\u3002<\/p>\n<h2>\u7ecf\u8fc7\u6d4b\u8bd5\u7684\u6e90\u914d\u7f6e<\/h2>\n<h4>Linux<\/h4>\n<h5>CPU<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u7248\u672c<\/th>\n<th>Python \u7248\u672c<\/th>\n<th>\u7f16\u8bd1\u5668<\/th>\n<th>\u6784\u5efa\u5de5\u5177<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>tensorflow-2.6.0<\/td>\n<td>3.6-3.9<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.7.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.5.0<\/td>\n<td>3.6-3.9<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.7.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.4.0<\/td>\n<td>3.6-3.8<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.1.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.3.0<\/td>\n<td>3.5-3.8<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.1.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.2.0<\/td>\n<td>3.5-3.8<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 2.0.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.1.0<\/td>\n<td>2.7\u30013.5-3.7<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 0.27.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.0.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 0.26.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.15.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 0.26.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.14.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.24.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.13.1<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.19.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.12.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.15.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.11.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.15.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.10.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.15.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.9.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.11.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.8.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.10.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.7.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.10.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.6.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.9.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.5.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.8.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.4.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.5.4<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.3.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.5<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.2.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.5<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.1.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.0.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>GPU<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u7248\u672c<\/th>\n<th>Python \u7248\u672c<\/th>\n<th>\u7f16\u8bd1\u5668<\/th>\n<th>\u6784\u5efa\u5de5\u5177<\/th>\n<th>cuDNN<\/th>\n<th>CUDA<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>tensorflow-2.6.0<\/td>\n<td>3.6-3.9<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.7.2<\/td>\n<td>8.1<\/td>\n<td>11.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.5.0<\/td>\n<td>3.6-3.9<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.7.2<\/td>\n<td>8.1<\/td>\n<td>11.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.4.0<\/td>\n<td>3.6-3.8<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.1.0<\/td>\n<td>8.0<\/td>\n<td>11.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.3.0<\/td>\n<td>3.5-3.8<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 3.1.0<\/td>\n<td>7.6<\/td>\n<td>10.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.2.0<\/td>\n<td>3.5-3.8<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 2.0.0<\/td>\n<td>7.6<\/td>\n<td>10.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.1.0<\/td>\n<td>2.7\u30013.5-3.7<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 0.27.1<\/td>\n<td>7.6<\/td>\n<td>10.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.0.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 0.26.1<\/td>\n<td>7.4<\/td>\n<td>10.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.15.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 7.3.1<\/td>\n<td>Bazel 0.26.1<\/td>\n<td>7.4<\/td>\n<td>10.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.14.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.24.1<\/td>\n<td>7.4<\/td>\n<td>10.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.13.1<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.19.2<\/td>\n<td>7.4<\/td>\n<td>10.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.12.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.15.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.11.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.15.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.10.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.15.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.9.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.11.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.8.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.10.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.7.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.9.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.6.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.9.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.5.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.8.0<\/td>\n<td>7<\/td>\n<td>9<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.4.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.5.4<\/td>\n<td>6<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.3.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.5<\/td>\n<td>6<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.2.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.5<\/td>\n<td>5.1<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.1.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.2<\/td>\n<td>5.1<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.0.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>GCC 4.8<\/td>\n<td>Bazel 0.4.2<\/td>\n<td>5.1<\/td>\n<td>8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>macOS<\/h4>\n<h5>CPU<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u7248\u672c<\/th>\n<th>Python \u7248\u672c<\/th>\n<th>\u7f16\u8bd1\u5668<\/th>\n<th>\u6784\u5efa\u5de5\u5177<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>tensorflow-2.6.0<\/td>\n<td>3.6-3.9<\/td>\n<td>Xcode 10.11 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 3.7.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.5.0<\/td>\n<td>3.6-3.9<\/td>\n<td>Xcode 10.11 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 3.7.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.4.0<\/td>\n<td>3.6-3.8<\/td>\n<td>Xcode 10.3 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 3.1.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.3.0<\/td>\n<td>3.5-3.8<\/td>\n<td>Xcode 10.1 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 3.1.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.2.0<\/td>\n<td>3.5-3.8<\/td>\n<td>Xcode 10.1 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 2.0.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.1.0<\/td>\n<td>2.7\u30013.5-3.7<\/td>\n<td>Xcode 10.1 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.27.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.0.0<\/td>\n<td>2.7\u30013.5-3.7<\/td>\n<td>Xcode 10.1 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.27.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-2.0.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>Xcode 10.1 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.26.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.15.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>Xcode 10.1 \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.26.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.14.0<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.24.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.13.1<\/td>\n<td>2.7\u30013.3-3.7<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.19.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.12.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.15.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.11.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.15.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.10.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.15.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.9.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.11.0<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.8.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.10.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.7.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.10.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.6.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.8.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.5.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.8.1<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.4.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.5.4<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.3.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.4.5<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.2.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.4.5<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.1.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.4.2<\/td>\n<\/tr>\n<tr>\n<td>tensorflow-1.0.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.4.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>GPU<\/h5>\n<table>\n<thead>\n<tr>\n<th>\u7248\u672c<\/th>\n<th>Python \u7248\u672c<\/th>\n<th>\u7f16\u8bd1\u5668<\/th>\n<th>\u6784\u5efa\u5de5\u5177<\/th>\n<th>cuDNN<\/th>\n<th>CUDA<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>tensorflow_gpu-1.1.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.4.2<\/td>\n<td>5.1<\/td>\n<td>8<\/td>\n<\/tr>\n<tr>\n<td>tensorflow_gpu-1.0.0<\/td>\n<td>2.7\u30013.3-3.6<\/td>\n<td>Xcode \u4e2d\u7684 Clang<\/td>\n<td>Bazel 0.4.2<\/td>\n<td>5.1<\/td>\n<td>8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000043209302\">https:\/\/segmentfault.com\/a\/1190000043209302<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eac\u4e1c\u79d1\u6280\u9690\u79c1\u8ba1\u7b97\u4ea7\u54c1\u90e8 \u66f9\u96e8\u6668 \u4e3a\u4ec0\u4e48\u4ece\u6e90\u4ee3\u7801\u6784\u5efa \u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u76f4\u63a5\u5b89\u88c5\u6784\u5efa\u597d\u7684.whl\u5373\u53ef\u3002\u4e0d\u8fc7\uff0c\u5f53\u9700\u8981\u4e00\u4e9b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10007035","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10007035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10007035"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10007035\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10007035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10007035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10007035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}