def _saveModel(model, experimentDir, checkpointLabel, newSerialization=False):
 checkpointDir = _getModelCheckpointDir(experimentDir, checkpointLabel)
 if newSerialization:
  model.writeToCheckpoint(checkpointDir)
 else:
  model.save(saveModelDir=checkpointDir)

def _saveModel ( model , experimentDir , checkpointLabel , newSerialization = False ) : checkpointDir = _getModelCheckpointDir ( experimentDir , checkpointLabel ) if newSerialization : model . writeToCheckpoint ( checkpointDir ) else : model . save ( saveModelDir = checkpointDir )
save model .