mac os下如何尝试编译 tensorflow
发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,本篇文章给大家分享的是有关mac os下如何尝试编译 tensorflow,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。编译环境及其工具
千家信息网最后更新 2025年12月02日mac os下如何尝试编译 tensorflow
本篇文章给大家分享的是有关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,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注行业资讯频道。
编译
尝试
工具
更多
版本
知识
篇文章
过程
实用
操作系统
分支
就是
工作会
文章
案例
环境
看吧
知识点
系统
行业
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
原神刚进游戏就重连服务器
服务器安全管理要求
中国移动网络安全资质
微软数据库价格
怎样进入软件开发
工控机服务器硬盘
女生网络安全与执法
公司用服务器多少钱
系统服务器冗余方案
网络安全设计图解
山东冠源软件开发有限公司
高淳区网络软件开发信息推荐
网络安全公司有多缺人
华为软件开发云创新中心太原
我的世界1.9服务器ip
盐城智能软件开发系统
五年网络安全手抄报
工商银行网络安全活动
工作室怎么做到全服务器都有金币
网络安全专班
加强网络技术防护
看数据库64还是32
清远物联网软件开发联系方式
代理服务器的分类
如何创建vfp数据库
魔兽世界莫斯科服务器
想学软件开发去哪儿学
白宫发布网络安全吗
手报网络安全
james邮件服务器