# pylint: disable=protected-access
local_init_op = (
estimator_spec.scaffold.local_init_op or
- monitored_session.Scaffold._default_local_init_op())
+ monitored_session.Scaffold.default_local_init_op())
# pylint: enable=protected-access
# Perform the export
if self._local_init_op is None:
self._local_init_op = Scaffold.get_or_default(
'local_init_op', ops.GraphKeys.LOCAL_INIT_OP,
- Scaffold._default_local_init_op)
+ Scaffold.default_local_init_op)
if self._summary_op is None:
self._summary_op = Scaffold.get_or_default('summary_op',
ops.GraphKeys.SUMMARY_OP,
return op
@staticmethod
- def _default_local_init_op():
+ def default_local_init_op():
+ """Returns an op that groups the default local init ops.
+
+ This op is used during session initialization when a Scaffold is
+ initialized without specifying the local_init_op arg. It includes
+ `tf.local_variables_initializer`, `tf.tables_initializer`, and also
+ initializes local session resources.
+
+ Returns:
+ The default Scaffold local init op.
+ """
return control_flow_ops.group(
variables.local_variables_initializer(),
lookup_ops.tables_initializer(),
argspec: "args=[\'self\', \'init_op\', \'init_feed_dict\', \'init_fn\', \'ready_op\', \'ready_for_local_init_op\', \'local_init_op\', \'summary_op\', \'saver\', \'copy_from_scaffold\'], varargs=None, keywords=None, defaults=[\'None\', \'None\', \'None\', \'None\', \'None\', \'None\', \'None\', \'None\', \'None\'], "
}
member_method {
+ name: "default_local_init_op"
+ argspec: "args=[], varargs=None, keywords=None, defaults=None"
+ }
+ member_method {
name: "finalize"
argspec: "args=[\'self\'], varargs=None, keywords=None, defaults=None"
}