Lazy init and return saver.
()
| 418 | |
| 419 | |
| 420 | def _get_saver(): |
| 421 | """Lazy init and return saver.""" |
| 422 | saver = _get_first_op_from_collection(ops.GraphKeys.SAVERS) |
| 423 | if saver is None and variables.global_variables(): |
| 424 | saver = tf_saver.Saver() |
| 425 | ops.add_to_collection(ops.GraphKeys.SAVERS, saver) |
| 426 | return saver |
| 427 | |
| 428 | |
| 429 | def _get_ready_op(): |
no test coverage detected