def optimizerModel2wts(model):
    """Convert an optimizer model file into a flat weight vector."""
    wts = []
    with open(model) as f:
        for line in f:
            wts.append(float(line.partition(' ')[2]))
    return wts