def _checkpointLabelFromCheckpointDir(checkpointDir):
 assert checkpointDir.endswith(g_defaultCheckpointExtension)
 lastSegment = os.path.split(checkpointDir)[1]
 checkpointLabel = lastSegment[0:(- len(g_defaultCheckpointExtension))]
 return checkpointLabel

def _checkpointLabelFromCheckpointDir ( checkpointDir ) : assert checkpointDir . endswith ( g_defaultCheckpointExtension ) lastSegment = os . path . split ( checkpointDir ) [ 1 ] checkpointLabel = lastSegment [ 0 : ( - len ( g_defaultCheckpointExtension ) ) ] return checkpointLabel
returns a checkpoint label string for the given model checkpoint directory checkpointdir: relative or absolute model checkpoint directory path .