亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

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

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

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

德化县| 湟中县| 阿克陶县| 芦溪县| 榆树市| 济宁市| 高要市| 曲周县| 葵青区| 兴宁市| 屏边| 松阳县| 祁阳县| 赞皇县| 绍兴县| 阳山县| 班玛县| 莎车县| 大厂| 布尔津县| 辽源市| 偃师市| 上饶市| 宾川县| 宜昌市| 濉溪县| 沽源县| 河间市| 阳新县| 呼玛县| 吉木萨尔县| 黄大仙区| 松滋市| 肇州县| 尼勒克县| 会理县| 宝清县| 山丹县| 临泉县| 松潘县| 汽车|