tensorfow estimator: WarmStartSettings
tensorflow version: v 1.13
在tf.estimator.WarmStartSettings
里, 是可以设置具体restore
哪些变量, 里面有两个参数,
ckpt_to_initialize_from
, 就是需要restore
的ckpt地址, 例如xx/model.ckpt-xx
vars_to_warm_start
, 就是判断哪些变量需要被restore的. 需要说明的是, 默认值是".*"
,它会使得程序去resotre
所有的TRAINABLE_VARIABLES
变量, 而这个变量集合里是不含有bn层的moving_mean
及moving_variance
参数的, 按照官网的解释就是:Defaults to '.*', which warm-starts all variables in the TRAINABLE_VARIABLES collection. Note that this excludes variables such as accumulators and moving statistics from batch norm.
因此有两种解决方法, 1是根据你需要
restore
的变量scope名字, 显式的指定需要restore
的变量, 如有多个名字, 可以放在一个列表里, 变量名字支持正则表达式寻找. 2 是传入参数[".*"]
, 让程序去从Global variable
里去恢复所有的变量, 这样就可以把bn层的moving_mean
及moving_variance
参数成功restore
.
tensorfow estimator: WarmStartSettings相关推荐
- tf.estimator的用法
tf.estimator的用法 利用 tf.estimator 训练模型时需要写两个重要的函数,一个用于数据输入的函数(input_fn),另一个用于模型创建的函数(model_fn).下面逐一来说明 ...
- Tensorflow API 讲解——tf.estimator.Estimator
class Estimator(builtins.object) #介绍 Estimator 类,用来训练和验证 TensorFlow 模型. Estimator 对象包含了一个模型 model_fn ...
- tensorflow estimator 实践
本文以mnist数据集为例.estimator通常是和tf的dataset一起使用,故先制作tfrecord文件,在使用estimator进行测试. 文章结构: 1.文件目录 2. 制作tfrecor ...
- tf.estimator.Estimator讲解
tf.estimator.Estimator 简单介绍 是一个class 所以需要初始化,作用是用来 训练和评价 tensorflow 模型的 Estimator对象包装由一个名为model_fn函数 ...
- tensorflow函数学习
1.学习率相关 1.tf.train.piecewise_constant(global_step, boundaries,values) 设置区间,使得不同的step有不同的学习率.学习率的变化是阶 ...
- tf.estimator用法
estimator:估算器 tf.estimator -----一种高级TensorFlow API.估算器封装以下操作: 训练(training) 评价(evaluation) 预测(predict ...
- 怎样从tensorflow的generator object Estimator.predict at 0x7fb1ecefeaf0中取数据
怎样从tensorflow的<generator object Estimator.predict at 0x7fb1ecefeaf0>中取数据 通过以下代码: predictions = ...
- 【 Notes 】Best linear unbiased estimator(BLUE) approach for time-of-arrival based localisation
目录 Abstract Introduction BLUE-based positioning BLUE-LSC algorithm BLUE-LLS algorithm Abstract A com ...
- 【 Notes 】WLLS Algorithm of TOA - Based Positioning (include the two - step WLS estimator)
目录 LLS review WLLS the two - step WLS estimator LLS review 前面有博文:LLS,提到了线性最小二乘算法,使用LLS去求解TOA-Based P ...
最新文章
- hdu 1087 Super Jumping! Jumping! Jumping!
- Flask项目--爱家租房项目结构图
- 10分钟 在linux里创建.net core helloworld控制台程序
- Codeforces 482 - Diverse Permutation 构造题
- Sprite Kit 入门教程
- js29--装饰着模式
- UnityShader16:点光源和聚光灯
- c语言函数返回数组_C语言如何用一维数组拷贝函数,拷贝二位数组(C Primer Plus 10-7)...
- 一个女SEOer的忏悔书
- RK3128 Linux 源代码,rk3128开发板linux开发使用指南(35页)-原创力文档
- WEB端后台常用Axure元件库及框架模版
- emp和emn是什么文件_emn格式文件
- SDN(软件定义网络)简史-早期
- layui icon服务器上显示不出来,关于layui的动态图标不显示的解决方法
- 关于iexplore.exe占用CPU100%的问题
- 导入FontForge生成字体
- JAVA:实现PigeonholeSort鸽巢排序算法(附完整源码)
- github如何开启两步验证
- 使用OCR技术将扫描PDF转换为可编辑的Word文档。
- 给div盒子设置背景图片