首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Tensorflow从源头建立,而不是更快地进行再培训?

Tensorflow从源头建立,而不是更快地进行再培训?
EN

Stack Overflow用户
提问于 2017-05-27 18:16:49
回答 1查看 1K关注 0票数 2

我一直在我可爱的MBP上运行Tensorflow,只有CPU。我决定用Bazel构建一个Tensorflow版本,以加快速度: SSE4.1、SSE4.2、AVX、AVX2和FMA。

代码语言:javascript
复制
bazel build --copt=-march=native //tensorflow/tools/pip_package:build_pip_package

但是重新使用新安装的Inception v3模型并不快,它所用的时间完全相同。这很奇怪,因为在使用经过训练的初始模型进行推理时,我的速度提高了12%。MNIST示例的培训速度快了30%。

那么,我们是否有可能在进行再培训时没有任何速度效益呢?

我还为一个像解释的这里一样的保护器做了Bazel构建,同样的结果。

My ./配置:

代码语言:javascript
复制
Please specify the location of python. [Default is /Users/Gert/Envs/t4/bin/python]: Users/Gert/Envs/t4/bin/python3
Invalid python path. Users/Gert/Envs/t4/bin/python3 cannot be found
Please specify the location of python. [Default is /Users/Gert/Envs/t4/bin/python]: ls
Invalid python path. ls cannot be found
Please specify the location of python. [Default is /Users/Gert/Envs/t4/bin/python]: lslss
Invalid python path. lslss cannot be found
Please specify the location of python. [Default is /Users/Gert/Envs/t4/bin/python]: /rt/Envs/t4/bin/python3^C
(t4) Gerts-MacBook-Pro:tensorflow root#
(t4) Gerts-MacBook-Pro:tensorflow root# ./configure
Please specify the location of python. [Default is /Users/Gert/Envs/t4/bin/python]: /Users/Gert/Envs/t4/bin/python3
Please specify optimization flags to use during compilation [Default is -march=native]:
Do you wish to use jemalloc as the malloc implementation? (Linux only) [Y/n] n
jemalloc disabled on Linux
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] n
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] n
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] n
No XLA JIT support will be enabled for TensorFlow
Found possible Python library paths:
  /Users/Gert/Envs/t4/lib/python3.4/site-packages
Please input the desired Python library path to use.  Default is [/Users/Gert/Envs/t4/lib/python3.4/site-packages]

Using python library path: /Users/Gert/Envs/t4/lib/python3.4/site-packages
Do you wish to build TensorFlow with OpenCL support? [y/N] n
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] n
No CUDA support will be enabled for TensorFlow
Configuration finished

谢谢,

格特

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-05-28 19:10:19

MNIST示例将大部分时间花在矩阵产品中。

另一方面,典型的CNN大部分时间都花在卷积中。

TF在CPU上使用特征作为它的矩阵产品,这是相当优化的,正如我所理解的,以及为什么你看到一个明显的加速。

如果我的信息是最新的,CPU上的卷积就不是那么优化了。他们浪费了复制数据的时间,因此可以用矩阵乘法来处理。因此,当后者加速时,影响较小。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44220225

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档