91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mac os下如何嘗試編譯 tensorflow

發布時間:2021-12-23 15:28:07 來源:億速云 閱讀:164 作者:柒染 欄目:大數據

本篇文章給大家分享的是有關mac os下如何嘗試編譯 tensorflow,小編覺得挺實用的,因此分享給大家學習,希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。

編譯環境及其工具

編譯工具:bazel (https://bazel.build/versions/master/docs/bazel-overview.html)

mac 操作系統版本:16.1.0 Darwin Kernel

tensorflow 版本:github 當前master分支

編譯操作過程

git clone https://github.com/tensorflow/tensorflow
cd tensorflow
./configure  
配置過程沒有使用GPU

bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

sudo pip install /tmp/tensorflow_pkg/tensorflow-1.0.1-cp27-cp27m-macosx_10_12_intel.whl

hello world 案例

(dev-djdemo) ?  dev-djdemo python
Python 2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
>>> print(sess.run(hello))
Hello, TensorFlow!

以上就是mac os下如何嘗試編譯 tensorflow,小編相信有部分知識點可能是我們日常工作會見到或用到的。希望你能通過這篇文章學到更多知識。更多詳情敬請關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

澄江县| 西畴县| 东平县| 永吉县| 阿合奇县| 澄江县| 蒙城县| 龙里县| 图们市| 永年县| 马鞍山市| 长武县| 沁源县| 永康市| 泌阳县| 红原县| 南开区| 锦州市| 林口县| 阜平县| 清水河县| 彰武县| 霍林郭勒市| 温宿县| 邛崃市| 张家界市| 新密市| 南京市| 屯门区| 福泉市| 岱山县| 易门县| 衢州市| 巫溪县| 白沙| 石狮市| 梓潼县| 磴口县| 从化市| 银川市| 怀来县|