forked from tensorflow/tfjs-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize the tensor container to arbitrary depth (tensorflow#1083)
FEATURE Currently, calling `tf.dispose(obj)` or `tf.tidy(() => obj)` results in walking the `obj` for depth of 1 and disposing of any tensors found. With this change `obj` is walked to arbitrary depth with cycle-detection to defend against cyclical objects. This makes `tf.tidy()` and `tf.dispose()` more useful in practice. Also rename `util.extractTensorsFromContainer` to `util.getTensorsFromContainer` since we are not modifying (extracting from) the container.
- Loading branch information
Showing
5 changed files
with
74 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters