bazel

linux 源码安装 tensorflow C++

匿名 (未验证) 提交于 2019-12-02 21:59:42
系统:Ubuntu16.04 TensorFlow1.4 cpu版本 g++: 5.4.0 bazel: 0.5.4 参考:https://blog.csdn.net/zwx1995zwx/article/details/79064064 1,下载TensorFlow源代码 git clone https://github.com/tensorflow/tensorflow.git cd tensorflow git checkout r1.4 # 切换到所要编译的版本分支 2,安装bazel bazel的版本太高太低都会有问题,可以查看tensorflow/tensorflow/docs_src/install/install_sources.md文件中的版本需求。tf1.4版本对应的bazel版本是0.5.4。 安装bazel0.5.4:https://docs.bazel.build/versions/master/install-ubuntu.html#install-with-installer-ubuntu。推荐用installing using binary installer安装 3,编译Tensorflow 3.1,进入tensorflow文件夹 ./configure 按照提示都选n,参考https://blog.csdn.net/zwx1995zwx

Running a Tensorflow model on Android

别等时光非礼了梦想. 提交于 2019-12-02 17:37:48
I'm trying to figure out the workflow for training and deploying a Tensorflow model on Android. I'm aware of the other questions similar to this one on StackOverflow, but none of them seem to address the problems I've run into. After studying the Android example from the Tensorflow repository, this is what I think the workflow should be: Build and train Tensorflow model in Python. Create a new graph, and transfer all relevant nodes (i.e. not the nodes responsible for training) to this new graph. Trained weight variables are imported as constants so that the C++ API can read them. Develop

Xcode version must be specified to use an Apple CROSSTOOL

人盡茶涼 提交于 2019-12-02 15:10:20
I try to build tensorflow-serving using bazel but I've encountered some errors during the building ERROR:/private/var/tmp/_bazel_Kakadu/3f0c35881c95d2c43f04614911c03a57/external/local_config_cc/BUILD:49:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL. ERROR: Analysis of target '//tensorflow_serving/sources/storage_path:file_system_storage_path_source_proto' failed; build aborted. I've already tried to use bazel clean and bazel clean --expunge but it didn't help and still Bazel doesn't see my xcode (I suppose)

What are the differences between Bazel and Gradle?

最后都变了- 提交于 2019-12-02 14:05:29
Google just open-sourced its build tool Bazel . What are the differences between this tool and Gradle ? What can it do that Gradle cannot, what does it do better, and what does Gradle do better? Disclaimer: I work on Bazel and I'm not intimately familiar with Gradle. However, one of my coworkers wrote up a comparison of the two systems, which I will paraphrase here: Bazel and Gradle emphasize different aspects of the build experience. To some extent, their priorities are incompatible - Gradle’s desire for flexibility and non-obtrusiveness limits the restrictions it can place on build structure

How to fix tensorflow protobuf compilation errors on OSX?

﹥>﹥吖頭↗ 提交于 2019-12-02 11:34:15
问题 I'm trying to compile TensorFlow after checking out the repo. I've reached a point where I'm stuck with google protobuf errors: INFO: From Compiling tensorflow/core/kernels/histogram_op_gpu.cu.cc: ./tensorflow/core/lib/core/status.h(32): warning: attribute "warn_unused_result" does not apply here external/protobuf_archive/src/google/protobuf/arena.h(719): error: more than one instance of overloaded function "google::protobuf::Arena::CreateMessageInternal" matches the argument list: function

常用网址备份

杀马特。学长 韩版系。学妹 提交于 2019-12-02 08:34:39
一、Tensorflow 1、安装包下载链接: https://pypi.org/project/tensorflow-gpu/1.10.0/#files 2、源码下载链接: http://github.com/tensorflow/tensorflow 二、Bazel下载链接: https://github.com/bazelbuild/bazel/releases 来源: https://www.cnblogs.com/jimchen1218/p/11738077.html

How to fix tensorflow protobuf compilation errors on OSX?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 06:19:56
I'm trying to compile TensorFlow after checking out the repo. I've reached a point where I'm stuck with google protobuf errors: INFO: From Compiling tensorflow/core/kernels/histogram_op_gpu.cu.cc: ./tensorflow/core/lib/core/status.h(32): warning: attribute "warn_unused_result" does not apply here external/protobuf_archive/src/google/protobuf/arena.h(719): error: more than one instance of overloaded function "google::protobuf::Arena::CreateMessageInternal" matches the argument list: function template "T *google::protobuf::Arena::CreateMessageInternal<T>(google::protobuf::Arena *)" function

bazel “undeclared inclusion(s)” errors after updating gcc

[亡魂溺海] 提交于 2019-12-02 04:14:07
After updating from gcc-7.1 to gcc-7.2 I'm getting a lot of errors about undeclared inclusions of standard library headers. For example $ bazel build //test:my_test ERROR: /home/haining/my_project/BUILD:39:1: undeclared inclusion(s) in rule '//test:my_test': this rule is missing dependency declarations for the following files included by 'test/test_range.cpp': '/home/haining/gcc-7.2/include/c++/7.2.0/cstddef' '/home/haining/gcc-7.2/include/c++/7.2.0/x86_64-pc-linux-gnu/bits/c++config.h' '/home/haining/gcc-7.2/include/c++/7.2.0/x86_64-pc-linux-gnu/bits/os_defines.h' '/home/haining/gcc-7.2

Tensorflow building error

戏子无情 提交于 2019-12-02 02:27:20
I got this error while building Tensorflow 1.1.0 Starting local Bazel server and connecting to it... ERROR: /home/bishal/.cache/bazel/_bazel_bishal/798d6395d959361055d9b5ddcd7dcd45/external/io_bazel_rules_closure/closure/testing/phantomjs_test.bzl:31:10: name 'set' is not defined ERROR: /home/bishal/.cache/bazel/_bazel_bishal/798d6395d959361055d9b5ddcd7dcd45/external/io_bazel_rules_closure/closure/private/defs.bzl:27:16: name 'set' is not defined ERROR: /home/bishal/.cache/bazel/_bazel_bishal/798d6395d959361055d9b5ddcd7dcd45/external/io_bazel_rules_closure/closure/compiler/closure_js_binary

Produce static libs from tensorflow_cc and tensorflow_framework

雨燕双飞 提交于 2019-12-01 23:50:15
问题 As far as I understand using bazel I can only produce libtensorflow_cc.so and libtensorflow_framework.so . I need to produce static libs that are position independent ( -fPIC ) because I'll link them to a dynamic lib of my own later. I found this answer which suggest the use of a Makefile included in the project. I successfully used it to replace the libtensorflow_cc.so but what can I do to replace libtensorflow_framework.so ? 回答1: Not an actual answer, but too long for a comment. I managed