| Commit message (Collapse) | Author | Age |
|
|
|
| |
PiperOrigin-RevId: 214824023
|
|
|
|
|
|
|
|
| |
self.test_session() has been deprecated in 9962eb5e84b15e309410071b06c2ed2d6148ed44 as its name confuses readers of the test. Moving to cached_session() instead which is more explicit about:
* the fact that the session may be reused.
* the session is not closed even when doing a "with self.test_session()" statement.
PiperOrigin-RevId: 212336352
|
|
|
|
|
|
| |
Pure refactor, in preparation for adding a higher level checkpoint management utility. This utility will also need to work with the Checkpoint proto, and globbing it on to saver.py seems dirty.
PiperOrigin-RevId: 207179646
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Rename _build_initializer_expr to _try_guard_against_uninitialized_dependencies so as to clarify what it does.
- Avoid invoking the logic in _try_guard_against_uninitialized_dependencies for cyclic graphs. This currently results in infinite recursion which blows the stack.
- Use memoization to reduce the number of redundant operations created by _try_guard_against_uninitialized_dependencies when it encounters initial values with diamond-shaped dependencies.
- Refactoring: Remove unnecessary logic in _try_guard_against_uninitialized_dependencies for dealing with types other than Tensor or Operation. The dependency graph of a Variable's _initial_value should only ever comprise these two types.
- Refactoring: Added some filtering logic to _try_guard_against_uninitialized_dependencies to avoid initial_values with cyclic dependencies
- Refactoring: Moved the recursive traversal of initial_value`s dependencies into _safe_initial_value_from_tensor and _safe_initial_value_from_op.
- Refactoring: Made it so _find_initialized_value_for_variable will return None when it can't find the initialized_value. Currently it returns a Tensor when it finds the initialized_value and an Operation when it can't. This makes the logic in the caller a bit more consistent and explicit.
Future changes will address more of the shortcomings of _build_initializer_expr.
PiperOrigin-RevId: 180876754
|
|
|
|
|
|
| |
value of another variable v, make sure that the initializer of v is run first.
PiperOrigin-RevId: 161226052
|
|
|
|
|
|
|
| |
non-tensor object is passed in.
Otherwise the 'name' property is missing.
Change: 154868022
|
|
|
|
| |
Change: 142575145
|
|
|
|
| |
Change: 142318245
|
|
|
|
|
|
|
|
| |
Additionally:
- change single quotes to double quotes to make path rewriting easier
- guard windows lib reference with PLATFORM_WINDOWS
- fixed failing kmeans test
Change: 141515942
|
|
|
|
| |
Change: 138128703
|
|
|
|
|
| |
Also, changed the return type of FileIO.readline(), FileIO.readlines(), list_directories() and walk() to be strings rather than bytes.
Change: 132634441
|
|
|
|
| |
Change: 130801349
|
|
|
|
|
|
|
| |
1. Model is not restored from checkpoint
2. No init_op, init_fn, local_init_op provided
3. ready_op passes regardless
Change: 130366039
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ready_for_local_init_op checks if a model is ready to run local_init_op;
ready_for_local_init_op is always checked before local_init_op is run.
Failure to pass ready_for_local_init_op results in different behaviors:
1. In prepare_session, a RuntimeError is raised, since the model cannot be made
ready.
2. In recover_session, the `initialized` flag is returned as False, to indicate
that the checkpoint recovery failed to make the model ready to run
local_init_op. (If recover_session was called from prepare_session, the
initialization process defaults back to using init_op and init_fn, i.e., it
creates a fresh session.)
3. In wait_for_session, only by passing ready_for_local_init_op (and also
ready_op) is a session returned. Otherwise, failing ready_for_local_init_op
causes wai_for_session to continue to wait for the model to be made into a
ready state to run local_init_op.
Change: 130189227
|
|
|
|
| |
Change: 123900456
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
containing names of the uninitialized variables when run. Supervisor's
ready_op is now implemented with report_uninitialized_variables().
If you write custom ready_op, please make sure
1. If the model is ready, it returns an empty tensor.
2. If the model is not ready, it returns a 1-D tensor containing reasons why
the model is not ready.
assert_variables_initialized() will be kept for 6 months for backward compatibility.
Change: 121407132
|
|
|
|
| |
Change: 120139351
|
|
|
|
| |
Change: 119321281
|
|
|
|
|
|
| |
N secs.
Change: 119119175
|
|
|
|
| |
Change: 118968679
|
|
|
|
| |
Change: 117825911
|
|
Change: 117170777
|