How can I deploy TensorFlow on a different computer from the one I build it on? Which files need to be copied across? Building from source on each and every target PC is impractical. In my case I need to build from source since the standard install of TensorFlow
is not optimized for my target (non-GPU build but with AVX/AVX2 available), not that that should make any difference. I am building & deploying on Windows PCs, which almost certainly will make a difference.
相关问题
- batch_dot with variable batch size in Keras
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- tensorflow 神经网络 训练集准确度远高于验证集和测试集准确度?
- Tensorflow: device CUDA:0 not supported by XLA ser
- Warning : HTML 1300 Navigation occured?
- Override env values defined in container spec
- Bundling the Windows Mono runtime with an applicat
- Numpy array to TFrecord
Think:
python
.Tensorflow
is essentially a python package, and python packages are installed withpip
.In this specific case, the standard installation of
TensorFlow
(version 1.5) was easily installed on my target system usingpip3 install --upgrade tensorflow
as per standard TensorFlow instructions. But when I tested examples I had already developed I was warned that the install was not optimal, sinceAVX
andAVX2
instructions were available, but not being used.To rebuild
Tensorflow
from source to make use ofAVX2
, follow instructions here, in particular:git clone https://github.com/tensorflow/tensorflow
CMake
, which requiredSWIG
)AVX
orAVX2
(for me, I added-Dtensorflow_WIN_CPU_SIMD_OPTIONS=/arch:AVX2
to the options during theCMake
step)CMake
step-by-step instructions)Once you have the package (a
wheel
or.whl
) file, move it to the target PC, and install it usingpip3 install tensorflow-<version-specific-details>.whl
.This process has been tested on:
For the record, the use of
AVX2
instructions gave me approximately a 20% speed increase on my network training. Also, despite one of the known limitations being the need to use Python 3.5 for the CMake build, I have found no issue (so far) using Python 3.6.4.