plan_test.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:fold 作者: tensorflow 项目源码 文件源码
def test_run_feed_dict(self):
    p = self.create_plan(loom_input_tensor=None)
    p.examples = [1] * 4
    self.check_plan(p, [])
    # Test that we don't clobber a better checkpoint with a worse one.
    tf.reset_default_graph()
    self._ClearCachedSession()
    p = self.create_plan(loom_input_tensor=None)
    p.examples = [1] * 4
    p.epochs = 1
    p._loss_total = tf.constant(42.0)
    # We aren't using a managed session, so we need to run this ourselves.
    init_op = tf.global_variables_initializer()
    sv = p.create_supervisor()
    with self.test_session() as sess:
      sess.run(init_op)
      p.run(sv, sess)
      log_str = p.print_file.getvalue()
      self.assertNotIn('new best model saved', log_str)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号