Ejemplo n.º 1
0
 def set_learning_rate(self, value, session):
     """
 :param float value:
 :param tf.Session session:
 """
     from TFUtil import VariableAssigner
     VariableAssigner(self.learning_rate_var).assign(value, session=session)
Ejemplo n.º 2
0
 def get_var_assigner(self, var):
   """
   :param tf.Variable var:
   """
   if var in self._assigner_cache:
     return self._assigner_cache[var]
   with reuse_name_scope("var_assigner"):
     assigner = VariableAssigner(var)
   self._assigner_cache[var] = assigner
   return assigner