第一步,读一读这篇博客

https://www.jb51.net/article/138932.htm (浅谈Tensorflow模型的保存与恢复加载)

第二步:

参考博客:

  • https://blog.csdn.net/u011734144/article/details/82107610

  按照上述教程配置好相关文件之后(模型是下面tensorflow-serving中产生的,直接移到textcnnrnn中的)然后再执行下面命令:

首先启动:

ljj@debian:~$ docker run -p 8501:8501   --mount type=bind,source=/home/ljj/serving/tensorflow_serving/servables/tensorflow/testdata/textcnnrnn,target=/models/find_lemma_category -e MODEL_NAME=find_lemma_category -t tensorflow/serving

然后调用:

ljj@debian:~$ curl --tlsv1.2 -d '{"instances": [10,10,10,8,6,1,8,9,1]}'   -X POST http://0.0.0.0:8501/v1/models/find_lemma_category:predict  

但是出现错误:

{ "error": "instances is a plain list, but expecting list of objects as multiple input tensors required as per tensorinfo_map" }ljj@debian:~$

事故现场:

  • https://www.jianshu.com/p/2fffd0e332bc
  • https://blog.csdn.net/SEUer_jeff/article/details/75578732
  • https://blog.csdn.net/wangjian1204/article/details/68928656

参考教程:

  • https://hub.docker.com/r/bitnami/tensorflow-serving

在这个教程中:https://github.com/tobegit3hub/tensorflow_template_application

在Ubuntu中命令应如下

python sparse_classifier.py train_file ./data/cancer/cancer_train.csv.tfrecords validate_file ./data/cancer/cancer_test.csv.tfrecords feature_size 4 label_size 3  enable_colored_log

python dense_classifier.py train_file ./data/cancer/cancer_train.csv.tfrecords validate_file ./data/cancer/cancer_test.csv.tfrecords feature_size 4 label_size 3  enable_colored_log

使用dense_classifier.py 即可产生checkpoint文件夹,可供后续在http_service中使用rest_server进行调用。但是具体调用浏览器端仍存在数组越界的问题

安装一个命令行下使用的文本浏览器便于测试使用

https://www.cnblogs.com/tsdxdx/p/7221132.html

Debian/Ubuntu:   apt-get install w3m w3m-img

Centos:   yum install w3m w3m-img

常见问题

不再支持export

    • https://www.jianshu.com/p/91aae37f1da6

最新文章

  1. Redis——学习之路四(初识主从配置)
  2. js 简体中文拼音对应表
  3. 关于easyUI的模态对话框
  4. ab.exe使用
  5. bzoj1266
  6. Content related to smartcards (and RFID/NFC)
  7. php的header()函数前有echo输出情况分析
  8. MySQL性能、监控与灾难恢复
  9. L2-010. 排座位
  10. Ubuntu 14.04下搭建Node.js的开发环境
  11. SQL SERVER分区具体例子详解
  12. bootstrap 的可编辑下拉框 jquery.editable-select
  13. DML、DDL、DCL的区别
  14. 算法第四版 coursera公开课 普林斯顿算法 ⅠⅡ部分 Robert Sedgewick主讲《Algorithms》
  15. mysql安装杂记
  16. prototype:构造函数的真相、原型链
  17. 《剑指offer》第十三题(机器人的运动范围)
  18. hdu 4779 Tower Defense (思维+组合数学)
  19. AngularJS实现鼠标右键事件
  20. emacs之开始就加载tag

热门文章

  1. C#进阶系列—WebApi
  2. echarts中国地图描绘
  3. docker部署zabbix并设置自动发现规则
  4. Jmeter对Websocket进行接口压力测试
  5. loadrunner如何监控linux,以及重点指标分析
  6. cook,session
  7. Kubernetes-Service(服务)
  8. (六)springMvc 和 mybatis 整合
  9. php中的访问类型(public,private,protected)
  10. Antd中,Form和Select联合使用,导致placeholder不生效分析