MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / add_to_collection

Method add_to_collection

tensorflow/python/framework/ops.py:3887–3903  ·  view source on GitHub ↗

Stores `value` in the collection with the given `name`. Note that collections are not sets, so it is possible to add a value to a collection several times. Args: name: The key for the collection. The `GraphKeys` class contains many standard names for collections. va

(self, name, value)

Source from the content-addressed store, hash-verified

3885 return list(self._collections)
3886
3887 def add_to_collection(self, name, value):
3888 """Stores `value` in the collection with the given `name`.
3889
3890 Note that collections are not sets, so it is possible to add a value to
3891 a collection several times.
3892
3893 Args:
3894 name: The key for the collection. The `GraphKeys` class contains many
3895 standard names for collections.
3896 value: The value to add to the collection.
3897 """ # pylint: disable=g-doc-exception
3898 self._check_not_finalized()
3899 with self._lock:
3900 if name not in self._collections:
3901 self._collections[name] = [value]
3902 else:
3903 self._collections[name].append(value)
3904
3905 def add_to_collections(self, names, value):
3906 """Stores `value` in the collections given by `names`.

Callers 15

test_get_collectionsMethod · 0.95
add_to_collectionsMethod · 0.95
optimizeFunction · 0.80
_generate_saved_modelFunction · 0.80
add_model_variableFunction · 0.80
setUpMethod · 0.80
doBasicsOneExportPathMethod · 0.80
initMethod · 0.80
ExportFunction · 0.80
sequence_input_layerFunction · 0.80

Calls 2

_check_not_finalizedMethod · 0.95
appendMethod · 0.45