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

Method _slot_dict

tensorflow/python/training/optimizer.py:1273–1287  ·  view source on GitHub ↗

Returns a dict for caching slots created under the given name. Args: slot_name: Name for the slot. Returns: A dict that maps primary `Variable` objects to the slot created for that variable, under the given slot name.

(self, slot_name)

Source from the content-addressed store, hash-verified

1271 # --------------
1272
1273 def _slot_dict(self, slot_name):
1274 """Returns a dict for caching slots created under the given name.
1275
1276 Args:
1277 slot_name: Name for the slot.
1278
1279 Returns:
1280 A dict that maps primary `Variable` objects to the slot created
1281 for that variable, under the given slot name.
1282 """
1283 named_slots = self._slots.get(slot_name, None)
1284 if named_slots is None:
1285 named_slots = {}
1286 self._slots[slot_name] = named_slots
1287 return named_slots
1288
1289 def _get_or_make_slot(self, var, val, slot_name, op_name, slot_config=None):
1290 """Find or create a slot for a variable.

Callers 4

_get_or_make_slotMethod · 0.95
_zeros_slotMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected