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_meanmoving_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_meanmoving_variance参数成功restore.

tensorfow estimator: WarmStartSettings相关推荐

  1. tf.estimator的用法

    tf.estimator的用法 利用 tf.estimator 训练模型时需要写两个重要的函数,一个用于数据输入的函数(input_fn),另一个用于模型创建的函数(model_fn).下面逐一来说明 ...

  2. Tensorflow API 讲解——tf.estimator.Estimator

    class Estimator(builtins.object) #介绍 Estimator 类,用来训练和验证 TensorFlow 模型. Estimator 对象包含了一个模型 model_fn ...

  3. tensorflow estimator 实践

    本文以mnist数据集为例.estimator通常是和tf的dataset一起使用,故先制作tfrecord文件,在使用estimator进行测试. 文章结构: 1.文件目录 2. 制作tfrecor ...

  4. tf.estimator.Estimator讲解

    tf.estimator.Estimator 简单介绍 是一个class 所以需要初始化,作用是用来 训练和评价 tensorflow 模型的 Estimator对象包装由一个名为model_fn函数 ...

  5. tensorflow函数学习

    1.学习率相关 1.tf.train.piecewise_constant(global_step, boundaries,values) 设置区间,使得不同的step有不同的学习率.学习率的变化是阶 ...

  6. tf.estimator用法

    estimator:估算器 tf.estimator -----一种高级TensorFlow API.估算器封装以下操作: 训练(training) 评价(evaluation) 预测(predict ...

  7. 怎样从tensorflow的generator object Estimator.predict at 0x7fb1ecefeaf0中取数据

    怎样从tensorflow的<generator object Estimator.predict at 0x7fb1ecefeaf0>中取数据 通过以下代码: predictions = ...

  8. 【 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 ...

  9. 【 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 ...

最新文章

  1. hdu 1087 Super Jumping! Jumping! Jumping!
  2. Flask项目--爱家租房项目结构图
  3. 10分钟 在linux里创建.net core helloworld控制台程序
  4. Codeforces 482 - Diverse Permutation 构造题
  5. Sprite Kit 入门教程
  6. js29--装饰着模式
  7. UnityShader16:点光源和聚光灯
  8. c语言函数返回数组_C语言如何用一维数组拷贝函数,拷贝二位数组(C Primer Plus 10-7)...
  9. 一个女SEOer的忏悔书
  10. RK3128 Linux 源代码,rk3128开发板linux开发使用指南(35页)-原创力文档
  11. WEB端后台常用Axure元件库及框架模版
  12. emp和emn是什么文件_emn格式文件
  13. SDN(软件定义网络)简史-早期
  14. layui icon服务器上显示不出来,关于layui的动态图标不显示的解决方法
  15. 关于iexplore.exe占用CPU100%的问题
  16. 导入FontForge生成字体
  17. JAVA:实现PigeonholeSort鸽巢排序算法(附完整源码)
  18. github如何开启两步验证
  19. 使用OCR技术将扫描PDF转换为可编辑的Word文档。
  20. 给div盒子设置背景图片

热门文章

  1. Google-Authenticator双因子认证
  2. ImageGP新上工具:序列提取ID、motif、翻译、反向互补
  3. 「Python」学习Day 2. 翻转英文句子字符串
  4. 数据可视化(4)散点图及面积图
  5. 2017年终总结(数据开发,数据分析)-忙乱
  6. 手机号码验证 正确答案在文章末尾
  7. 服务器换IP地址导致微信第三方服务失效
  8. 小小数学家(python)
  9. 激光雷达点云配准算法
  10. 亚马逊listing不出单的原因有哪些?又该如何改善?