parameters: (optimizer_path)
return_statement: return _name_slot_variable
docstring: Make a function for naming slot variables in an optimizer.
docstring_summary: Make a function for naming slot variables in an optimizer.
docstring_tokens: Make a function for naming slot variables in an optimizer .
function: def _slot_variable_naming_for_optimizer(optimizer_path):
    """Make a function for naming slot variables in an optimizer."""
    # Name slot variables:
    #
    #   <variable name>/<_OPTIMIZER_SLOTS_NAME>/<optimizer path>/<slot name>
    #
    # where <variable name> is exactly the checkpoint name used for the original
    # variable, including the path from the checkpoint root and the local name in
    # the object which owns it. Note that we only save slot variables if the
    # variable it's slotting for is also being saved.
  
    optimizer_identifier = "/%s/%s/" % (_OPTIMIZER_SLOTS_NAME, optimizer_path)
  
    def _name_slot_variable(variable_path, slot_name):
      """With an optimizer specified, name a slot variable."""
      return (variable_path
              + optimizer_identifier
              + _escape_local_name(slot_name))
  
    return _name_slot_variable
function_tokens: def _slot_variable_naming_for_optimizer ( optimizer_path ) : # Name slot variables: # #   <variable name>/<_OPTIMIZER_SLOTS_NAME>/<optimizer path>/<slot name> # # where <variable name> is exactly the checkpoint name used for the original # variable, including the path from the checkpoint root and the local name in # the object which owns it. Note that we only save slot variables if the # variable it's slotting for is also being saved. optimizer_identifier = "/%s/%s/" % ( _OPTIMIZER_SLOTS_NAME , optimizer_path ) def _name_slot_variable ( variable_path , slot_name ) : """With an optimizer specified, name a slot variable.""" return ( variable_path + optimizer_identifier + _escape_local_name ( slot_name ) ) return _name_slot_variable