(self)
| 519 | |
| 520 | @test_util.run_v1_only("b/120545219") |
| 521 | def testInitFn(self): |
| 522 | logdir = self._test_dir("default_init_op") |
| 523 | with ops.Graph().as_default(): |
| 524 | v = variables.VariableV1([1.0, 2.0, 3.0]) |
| 525 | |
| 526 | def _init_fn(sess): |
| 527 | sess.run(v.initializer) |
| 528 | |
| 529 | sv = supervisor.Supervisor(logdir=logdir, init_op=None, init_fn=_init_fn) |
| 530 | sess = sv.prepare_or_wait_for_session("") |
| 531 | self.assertAllClose([1.0, 2.0, 3.0], sess.run(v)) |
| 532 | sv.stop() |
| 533 | |
| 534 | @test_util.run_v1_only("b/120545219") |
| 535 | def testInitOpWithFeedDict(self): |
nothing calls this directly
no test coverage detected