zhaomingwork
2023-11-08 2e36e738ca39afc8d02f3d11013bd12f937cc874
funasr/bin/build_trainer.py
@@ -548,6 +548,7 @@
    init_param = modelscope_dict['init_model']
    cmvn_file = modelscope_dict['cmvn_file']
    seg_dict_file = modelscope_dict['seg_dict']
    bpemodel = modelscope_dict['bpemodel']
    # overwrite parameters
    with open(config) as f:
@@ -581,6 +582,10 @@
        args.seg_dict_file = seg_dict_file
    else:
        args.seg_dict_file = None
    if os.path.exists(bpemodel):
        args.bpemodel = bpemodel
    else:
        args.bpemodel = None
    args.data_dir = data_dir
    args.train_set = train_set
    args.dev_set = dev_set
@@ -614,6 +619,7 @@
    if batch_bins is not None:
        if args.dataset_type == "small":
            args.batch_bins = batch_bins
            args.dataset_conf["batch_conf"]["batch_size"] = batch_bins
        elif args.dataset_type == "large":
            args.dataset_conf["batch_conf"]["batch_size"] = batch_bins
        else: