tf.contrib.checkpoint.UniqueNameTracker
Stay organized with collections
Save and categorize content based on your preferences.
Adds dependencies on trackable objects with name hints.
tf.contrib.checkpoint.UniqueNameTracker()
Useful for creating dependencies with locally unique names.
Example usage:
class SlotManager(tf.contrib.checkpoint.Checkpointable):
def __init__(self):
# Create a dependency named "slotdeps" on the container.
self.slotdeps = tf.contrib.checkpoint.UniqueNameTracker()
slotdeps = self.slotdeps
slots = []
slots.append(slotdeps.track(tf.Variable(3.), "x")) # Named "x"
slots.append(slotdeps.track(tf.Variable(4.), "y"))
slots.append(slotdeps.track(tf.Variable(5.), "x")) # Named "x_1"
Attributes |
layers
|
|
losses
|
Aggregate losses from any Layer instances.
|
non_trainable_variables
|
|
non_trainable_weights
|
|
trainable
|
|
trainable_variables
|
|
trainable_weights
|
|
updates
|
Aggregate updates from any Layer instances.
|
variables
|
|
weights
|
|
Methods
track
View source
track(
trackable, base_name
)
Add a dependency on trackable
.
Args |
trackable
|
An object to add a checkpoint dependency on.
|
base_name
|
A name hint, which is uniquified to determine the dependency
name.
|
Returns |
trackable , for chaining.
|
Raises |
ValueError
|
If trackable is not a trackable object.
|
__eq__
View source
__eq__(
other
)
Return self==value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[]]