tf.GraphKeys
tf.GraphKeys
class tf.GraphKeys
Defined in tensorflow/python/framework/ops.py
.
See the guide: Building Graphs > Graph collections
Standard names to use for graph collections.
The standard library uses various well-known names to collect and retrieve values associated with a graph. For example, the tf.Optimizer
subclasses default to optimizing the variables collected under tf.GraphKeys.TRAINABLE_VARIABLES
if none is specified, but it is also possible to pass an explicit list of variables.
The following standard keys are defined:
-
GLOBAL_VARIABLES
: the default collection ofVariable
objects, shared across distributed environment (model variables are subset of these). Seetf.global_variables
for more details. Commonly, allTRAINABLE_VARIABLES
variables will be inMODEL_VARIABLES
, and allMODEL_VARIABLES
variables will be inGLOBAL_VARIABLES
. -
LOCAL_VARIABLES
: the subset ofVariable
objects that are local to each machine. Usually used for temporarily variables, like counters. Note: usetf.contrib.framework.local_variable
to add to this collection. -
MODEL_VARIABLES
: the subset ofVariable
objects that are used in the model for inference (feed forward). Note: usetf.contrib.framework.model_variable
to add to this collection. -
TRAINABLE_VARIABLES
: the subset ofVariable
objects that will be trained by an optimizer. Seetf.trainable_variables
for more details. -
SUMMARIES
: the summaryTensor
objects that have been created in the graph. Seetf.summary.merge_all
for more details. -
QUEUE_RUNNERS
: theQueueRunner
objects that are used to produce input for a computation. Seetf.train.start_queue_runners
for more details. -
MOVING_AVERAGE_VARIABLES
: the subset ofVariable
objects that will also keep moving averages. Seetf.moving_average_variables
for more details. -
REGULARIZATION_LOSSES
: regularization losses collected during graph construction.
The following standard keys are defined, but their collections are not automatically populated as many of the others are:
WEIGHTS
BIASES
ACTIVATIONS
Class Members
ACTIVATIONS
ASSET_FILEPATHS
BIASES
CONCATENATED_VARIABLES
COND_CONTEXT
EVAL_STEP
GLOBAL_STEP
GLOBAL_VARIABLES
INIT_OP
LOCAL_INIT_OP
LOCAL_RESOURCES
LOCAL_VARIABLES
LOSSES
MODEL_VARIABLES
MOVING_AVERAGE_VARIABLES
QUEUE_RUNNERS
READY_FOR_LOCAL_INIT_OP
READY_OP
REGULARIZATION_LOSSES
RESOURCES
SAVEABLE_OBJECTS
SAVERS
SUMMARIES
SUMMARY_OP
TABLE_INITIALIZERS
TRAINABLE_RESOURCE_VARIABLES
TRAINABLE_VARIABLES
TRAIN_OP
UPDATE_OPS
VARIABLES
WEIGHTS
WHILE_CONTEXT
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/GraphKeys