示例#1
0
def weighted_average(args):
    """
    Apply a weighted average to the models.
    :param args: Options for the averaging function:
              * models: Path to the models.
              * dest: Path to the averaged model. If unspecified, the model is saved in './model'
              * weights: Weight given to each model in the averaging. Should be the same number of weights than models.
                         If unspecified, it applies the same weight to each model (1/N).
    :return:
    """
    logger.info("Averaging %d models" % len(args.models))
    average_models(args.models, args.dest, weights=args.weights)
    logger.info('Averaging finished.')
示例#2
0
def weighted_average(args):

    logging.info("Averaging %d models" % len(args.models))
    average_models(args.models, args.dest, weights=args.weights)
    logging.info('Averaging finished.')
def weighted_average(args):

    logging.info("Averaging %d models" % len(args.models))
    average_models(args.models, args.dest, weights=args.weights)
    logging.info('Averaging finished.')