def get_modelpath_and_name(savedmodel_path):
    """
    Help function which returns the full path to a model, excluding the epoch
    number at the end, e.g. "./mybestmodel-40" returns "./mybestmodel".
    """
    return savedmodel_path[:savedmodel_path.rfind("-")]