Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.add_to_collections

View source on GitHub

Wrapper for Graph.add_to_collections() using the default graph.

Aliases:

  • tf.compat.v1.add_to_collections
tf.add_to_collections(
    names,
    value
)

See tf.Graph.add_to_collections for more details.

Args:

  • names: The key for the collections. The GraphKeys class contains many standard names for collections.
  • value: The value to add to the collections.

Eager Compatibility

Collections are only supported in eager when variables are created inside an EagerVariableStore (e.g. as part of a layer or template).