在 CPU 上优化 Tensorflow 图像识别

Optimize Tensorflow image recognition on CPU

我想知道是否可以优化Tensorflow(InceptionV.3)的图像识别。确实,我想介绍一下后者就VPS只装备了CPU。现在,我设法在 30-40 秒后得到结果,我想知道是否没有解决方案来减少这个时间:/(没有 GPU)

我在执行此代码时收到此警告:

2017-07-15 02: 40: 19.230276: W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library was not compiled to use SSE4.1 instructions, but these are CPU computations.
2017-07-15 02: 40: 19.230359: W tensorflow / core / platform / cpu_feature_guard.cc: 45] The TensorFlow library was not compiled to use SSE4.2 instructions, but these are CPU computations.

你觉得这次编译会大大减少吗?我没有在他们的网站上找到任何提到此警告的文件。 我是 Tensorflow 的新手,所以我不明白一切...... 我在 ubuntu 16.04 LTS,我使用 python 2.7.12

提前谢谢您! :)

您收到此警告是因为您的 CPU 具有 tensorflow 可用于更快工作的功能,但您下载的 "build" 不支持。解决方案是从源代码重建 tensorflow,是的,如果这是你收到的警告,它会在 99% 的时间内为你工作得更快。

接收有关如何从源构建 tensorflow 的说明 - Check here

当运行执行bazel build命令时,一定要使用--copt=-msse4.2标志