Tensorflow serving的编译
Tensorflow serving提供了部署tensorflow生成的模型给线上服务的方法,包括模型的export,load等等。
安装参考这个
https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/setup.md
但是由于被qiang的问题 (googlesource无法访问)
https://github.com/tensorflow/serving/issues/6
需要修改一下 WORKSPACE文件
new_http_archive(
name = "gmock_archive",
#url = "https://googlemock.googlecode.com/files/gmock-1.7.0.zip",
url = "https://github.com/peter-wangxu/gmock/archive/1.7.0.zip",
#sha256 = "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b",
sha256 = "9b0018413f4222b8ee5454a431918c324d010062eecb078677b6897d0c76bc42",
build_file = "tensorflow/google/protobuf/gmock.BUILD",
)
git_repository(
name = "boringssl_git",
#commit = "436432d849b83ab90f18773e4ae1c7a8f148f48d",
commit = "db0729054d5964feab9e60089ba2d06a181e78b1",
init_submodules = True,
#remote = "https://github.com/mdsteele/boringssl-bazel.git",
remote = "https://github.com/doubler/boringssl-bazel.git",
)
最近发现一个付费vpn,但是更方便一些,免得修改了。。
http://www.lvdou888.com/intro/ 绿豆vpn 挺好用 我在win下开启 可以再ubuntu下面命令行执行bazel 什么访问畅通了。。 还是很赞
注意需要先进入tensorflow路径
./configure一下
bazel build tensorflow_serving/…
最后验证一下
./bazel-bin/tensorflow_serving/example/mnist_inference --port=9000 ~/tmp/
I tensorflow_serving/session_bundle/session_bundle.cc:109] Attempting to load a SessionBundle from: /home/gezi/tmp/
E tensorflow_serving/example/mnist_inference.cc:190] Fail to load tensorflow export: /home/gezi/tmp/export.meta
gezi:~/other/serving$ bazel test tensorflow_serving/...
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 89 targets and 36 test targets...
INFO: Elapsed time: 31.664s, Critical Path: 28.86s
//tensorflow_serving/batching:batch_scheduler_test PASSED in 0.3s
//tensorflow_serving/batching:retrier_test PASSED in 0.2s
//tensorflow_serving/batching:streaming_batch_scheduler_test PASSED in 4.1s
//tensorflow_serving/batching/test_util:puppet_batch_scheduler_test PASSED in 0.2s
//tensorflow_serving/core:availability_helpers_test PASSED in 0.3s
//tensorflow_serving/core:dynamic_manager_benchmark PASSED in 28.5s
//tensorflow_serving/core:dynamic_manager_test PASSED in 0.3s
//tensorflow_serving/core:eager_load_policy_test PASSED in 0.2s
Tensorflow serving的编译的更多相关文章
- tensorflow serving GPU编译问题
编译gpu版本:bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow_serving/model_serv ...
- Tensorflow r1.12及tensorflow serving r1.12 GPU版本编译遇到的问题
1.git clone tensorflow serving 及tensorflow代码 2. ERROR: /root/.cache/bazel/_bazel_root/f71d782da17fd8 ...
- 学习笔记TF067:TensorFlow Serving、Flod、计算加速,机器学习评测体系,公开数据集
TensorFlow Serving https://tensorflow.github.io/serving/ . 生产环境灵活.高性能机器学习模型服务系统.适合基于实际数据大规模运行,产生多个模型 ...
- tensorflow serving
1.安装tensorflow serving 1.1确保当前环境已经安装并可运行tensorflow 从github上下载源码 git clone --recurse-submodules https ...
- Tensorflow Serving 模型部署和服务
http://blog.csdn.net/wangjian1204/article/details/68928656 本文转载自:https://zhuanlan.zhihu.com/p/233614 ...
- tensorflow serving 编写配置文件platform_config_file的方法
1.安装grpc gRPC 的安装: $ pip install grpcio 安装 ProtoBuf 相关的 python 依赖库: $ pip install protobuf 安装 python ...
- 基于TensorFlow Serving的深度学习在线预估
一.前言 随着深度学习在图像.语言.广告点击率预估等各个领域不断发展,很多团队开始探索深度学习技术在业务层面的实践与应用.而在广告CTR预估方面,新模型也是层出不穷: Wide and Deep[1] ...
- Tensorflow Serving介绍及部署安装
TensorFlow Serving 是一个用于机器学习模型 serving 的高性能开源库.它可以将训练好的机器学习模型部署到线上,使用 gRPC 作为接口接受外部调用.更加让人眼前一亮的是,它支持 ...
- TensorFlow Serving简介
一.TensorFlow Serving简介 TensorFlow Serving是GOOGLE开源的一个服务系统,适用于部署机器学习模型,灵活.性能高.可用于生产环境. TensorFlow Ser ...
随机推荐
- 【gulp】工作中的实战
写这篇文章的目的是为了以后的项目中懒得再去配gulp,直接可以拿这篇博客中的来用,因为有时候配置还是挺烦人的. gulp相关插件的介绍 用法比较简单,假设大家都会用gulp,下面主要介绍一下一些插件的 ...
- js parsefloat
项目中需要对返回的小数进行格式化,把零省略掉. 1.00 ---> 1 1.01 ---> 1.01 1.10 ---> 1.1 parseFloat() 函数可解析一个 ...
- href,src,url 整理
一.href 和 src 的定义及区别 href:Hypertext Reference(超文本引用),指定网络资源的位置,从而在当前元素或者当前文档和由当前属性定义的需要的锚点或资源之间定义一个链接 ...
- Struts2 更改校验配置文件位置
@(Java)[Struts|Interceptor] Struts2 更改校验配置文件位置 在Struts2中提供的拦截器校验ValidationInterceptor,该校验器中默认的配置文件位于 ...
- NPOI导出Excel (C#) 踩坑 之--The maximum column width for an individual cell is 255 charaters
/******************************************************************* * 版权所有: * 类 名 称:ExcelHelper * 作 ...
- 测试数组push和unshift方法的效率
先贴代码,之后再来补内容 <!DOCTYPE HTML> <html> <head> <title>测试数组push和unshift方法的效率</ ...
- Java多线程 5 多线程其他知识简要介绍
一.线程组 /** * A thread group represents a set of threads. In addition, a thread * group can also inclu ...
- Hibernate简易原生DAO的实现
写在最前: 初学Hibernate,在尝试把JDBC项目移植到Hibernate的过程中,碰到了不少的麻烦,最让人心烦意乱的自然是SQL语句改动造成的代码混乱.其实不难,网上的解决方案有很多, 不过. ...
- 第一届山东省ACM——Phone Number(java)
Description We know that if a phone number A is another phone number B’s prefix, B is not able to be ...
- 第3月第21天 nsclassfromstring返回null SVN报错:clean the working copy and then retry the operation
1. xcodeproj工程损坏时,.m文件没有加入编译. 2. SVN报错:clean the working copy and then retry the operation http://bl ...