
TensorFlow 研究实践 三
发布日期:2021-05-06 19:00:13
浏览次数:20
分类:技术文章
本文共 2004 字,大约阅读时间需要 6 分钟。
TensorFlow在图像识别中的应用
参考资料:C++ API的使用方法
用C++运行同样的Inception-v3模型 一、下载定义模型的GraphDef文件(在TensorFlow的根目录下运行):wget -O tensorflow/examples/label_image/data/inception_dec_2015.zip
learning@learning-virtual-machine:~/tensorflow$ wget https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zip -O tensorflow/examples/label_image/data/inception_dec_2015.zip--2016-05-10 11:13:05-- https://storage.googleapis.com/download.tensorflow.org/models/inception_dec_2015.zipResolving storage.googleapis.com (storage.googleapis.com)... 216.58.199.16, 2404:6800:4005:803::2010Connecting to storage.googleapis.com (storage.googleapis.com)|216.58.199.16|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 88631107 (85M) [application/zip]Saving to: ‘tensorflow/examples/label_image/data/inception_dec_2015.zip’tensorflow/examp 100%[===========>] 84.52M 4.50MB/s in 18s 2016-05-10 11:13:24 (4.70 MB/s) - ‘tensorflow/examples/label_image/data/inception_dec_2015.zip’ saved [88631107/88631107]
unzip tensorflow/examples/label_image/data/inception_dec_2015.zip -d tensorflow/examples/label_image/data/
二、编译加载和运行模型的C++代码。
下载并安装TensorFlow,在shell终端执行命令编译例子:bazel build tensorflow/examples/label_image/…
三、生成二进制可执行程序,然后运行:
bazel-bin/tensorflow/examples/label_image/label_image
出现问题,待解决
ERROR: /home/learning/tensorflow/tensorflow/cc/BUILD:28:1: Linking of rule '//tensorflow/cc:ops/candidate_sampling_ops_gen_cc' failed: gcc failed: error executing command /usr/bin/gcc -o bazel-out/host/bin/tensorflow/cc/ops/candidate_sampling_ops_gen_cc -pthread -no-canonical-prefixes -B/usr/bin -B/usr/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' ... (remaining 3 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.gcc.real: fatal error: -fuse-linker-plugin, but liblto_plugin.so not foundcompilation terminated.INFO: Elapsed time: 5572.445s, Critical Path: 5407.48slearning@learning-virtual-machine:~/tensorflow$
发表评论
最新留言
路过,博主的博客真漂亮。。
[***.116.15.85]2025年03月21日 13时09分28秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
webpack打包常见报错
2019-03-03
vuex—1vuex初始
2019-03-03
web前端面试一从输入url到看到页面发生了什么
2019-03-03
智慧水利的泵站自动化监控系统解决方案
2019-03-03
C getopt.h
2019-03-03
CentOS下Nvidia docker 2.0之安裝教程&踩坑實錄
2019-03-03
H5页面授权获取微信授权(openId,微信nickname等信息)
2019-03-03
SpringBoot的URL是如何拼接的
2019-03-03
2018年年终总结
2019-03-03
解决checkbox未选中不传递value的多种方法
2019-03-03
【pgsql-参数详解1】PostgreSQL默认参数值
2019-03-03
HTTP协议(1)_入门的一些教程和资源
2019-03-03
钉钉登录及常用的URL及IP
2019-03-03
CENTOS 删除nginx
2019-03-03
【redis键过期删除策略】很高兴再次认识你
2019-03-03
【工具篇】EasyExcel的应用
2019-03-03
SSM发送手机验证码——以网建SMS为例
2019-03-03