import pickle


def load_dimension_reduction_models(model_file):
    """
    :param model_file: model file name.

    :return: list of model dicts, one per DNN layer. Each model dict is of the form:
        'method': <name of the method used>
        'mean_data': <1D numpy array with the mean of the data features>
        'transform': <2D numpy array with the transformation matrix>
    """
    with open(model_file, 'rb') as fp:
        models = pickle.load(fp)

    return models