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

Method _create_slots

tensorflow/python/training/ftrl.py:127–136  ·  view source on GitHub ↗
(self, var_list)

Source from the content-addressed store, hash-verified

125 self._linear_name = linear_name
126
127 def _create_slots(self, var_list):
128 # Create the "accum" and "linear" slots.
129 for v in var_list:
130 with ops.colocate_with(v):
131 val = constant_op.constant(
132 self._initial_accumulator_value, dtype=v.dtype, shape=v.get_shape())
133 self._get_or_make_slot(v, val, "accum", self._accum_name or self._name,
134 slot_config=slot_creator.SlotConfig(slot_index=1, slot_num=2))
135 self._zeros_slot(v, "linear", self._linear_name or self._name,
136 slot_config=slot_creator.SlotConfig(slot_index=2, slot_num=2))
137
138 def _prepare(self):
139 self._learning_rate_tensor = ops.convert_to_tensor(

Callers

nothing calls this directly

Calls 5

colocate_withMethod · 0.80
_zeros_slotMethod · 0.80
constantMethod · 0.45
get_shapeMethod · 0.45
_get_or_make_slotMethod · 0.45

Tested by

no test coverage detected