tensorflow模型量化压缩
参考
https://blog.csdn.net/xygl2009/article/details/80596392
https://blog.csdn.net/xsfl1234/article/details/67669707
https://www.jianshu.com/p/d2637646cda1
1 安装bazel
https://docs.bazel.build/versions/master/install-ubuntu.html#install-with-installer-ubuntu
2 下载tensorflow源码
git clone https://github.com/tensorflow/tensorflow.git
3 bazel编译tensoflow源码
cd tensorflow # cd to the top-level directory created
./configure
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
4 利用transform_graph转换模型
/DATA/share/DeepLearning/code/tensorflow/bazel-bin/tensorflow/tools/graph_transforms/transform_graph \
--in_graph=./model_resnet100.pb \
--out_graph=./model_resnet100modified.pb \
--inputs=input0 \
--outputs=fcblock/fc1/add_1 \
--transforms='add_default_attributes strip_unused_nodes(type=float, shape="1,112,112,3") remove_nodes(op=Identity, op=CheckNumerics) fold_constants(ignore_errors=true) fold_batch_norms fold_old_batch_norms strip_unused_nodes sort_by_execution_order'
最新文章
- 【WCF】操作选择器
- Eclipse 调试技巧
- 【整理】强化学习与MDP
- navicat 连接oracle 出现ora06413 连接未打开
- 【POJ2699】The Maximum Number of Strong Kings(二分,最大流)
- HTML 5 Canvas 参考手册
- logback配置详解(二)
- Thinkphp用exp表达式执行mysql语句,查询某字段不为空is not null,自动增值
- android屏幕亮度
- 执行sql update use c#
- GPIO软件模拟I2C
- (转)2.4.1 基础知识--添加服务引用与Web引用的区别
- ubantu root 默认密码
- 关于 overridePendingTransition()使用
- 关于js封装框架类库之选择器引擎(二)
- 数据结构中的棧在C#中的实现
- hadoop用户写入文件权限不够的问题
- 什么是LDAP?
- 总结 Linux 下安装 PHP 扩展步骤
- MongoDB设置
热门文章
- [na]完全理解icmp协议
- nginx、Apache、Lighttpd启用HSTS
- 每日英语:Why Rate Your Marriage? A Numerical Score Can Help Couples Talk About Problems
- 【FastDFS】FastDFS在CentOS的搭建
- python将列表元素按指定数目分组
- 【ARM】AD转换器
- 【Java】自动类型转换规则
- Android MPAndroidChart LineChart 显示数据格式化
- java中volatile关键字的理解
- 一个实体对象不能由多个 IEntityChangeTracker 实例引用。