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

Method _create_slots

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

Source from the content-addressed store, hash-verified

114 self._epsilon_tensor = None
115
116 def _create_slots(self, var_list):
117 for v in var_list:
118 if v.get_shape().is_fully_defined():
119 init_rms = init_ops.ones_initializer(dtype=v.dtype.base_dtype)
120 else:
121 init_rms = array_ops.ones_like(v)
122 self._get_or_make_slot_with_initializer(v, init_rms, v.get_shape(),
123 v.dtype.base_dtype, "rms",
124 self._name)
125 if self._centered:
126 self._zeros_slot(v, "mg", self._name)
127 self._zeros_slot(v, "momentum", self._name)
128
129 def _prepare(self):
130 lr = self._call_if_callable(self._learning_rate)

Callers

nothing calls this directly

Calls 4

is_fully_definedMethod · 0.80
_zeros_slotMethod · 0.80
get_shapeMethod · 0.45

Tested by

no test coverage detected