tensorflow 1.13源码编译

bazel和tensorflow有严格的对应版本,对应关系如下:

  1. 编译tensorflow之前先要安装bazel;

https://github.com/bazelbuild/bazel/releases/tag/0.19.2下载需要的dbe,采用dpkg -i bazel_0.19.2-linux-x86_64.deb安装。

  1. 编译tensorflow

$ git clone https://github.com/tensorflow/tensorflow.git

$ cd tensorflow

$ git checkout r1.13  # r1.9, r1.10, etc.(这里选用的r1.13

$ ./configure

在configure时,其他选项选择no,CUDA选项选择yes,configure成功之后,然后编译GPU版本的tensorflow。

$ bazel build --config=opt --config=cuda //tensorflow/tools/graph_transforms:transform_graph

参考:https://tensorflow.google.cn/install/source

扫描二维码关注公众号,回复: 10331537 查看本文章
发布了36 篇原创文章 · 获赞 23 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/yy2yy99/article/details/104357125