游雁
2023-05-07 296ec00997d4ad4715286c8dad9cc2226d064b71
funasr/tasks/abs_task.py
@@ -467,7 +467,7 @@
        parser.add_argument(
            "--batch_interval",
            type=int,
            default=10000,
            default=-1,
            help="The batch interval for saving model.",
        )
        group.add_argument(
@@ -547,6 +547,12 @@
            type=int,
            default=1,
            help="The number of gradient accumulation",
        )
        group.add_argument(
            "--bias_grad_times",
            type=float,
            default=1.0,
            help="To scale the gradient of contextual related params",
        )
        group.add_argument(
            "--no_forward_run",
@@ -1582,8 +1588,11 @@
    ) -> AbsIterFactory:
        assert check_argument_types()
        if args.frontend_conf is not None and "fs" in args.frontend_conf:
            dest_sample_rate = args.frontend_conf["fs"]
        if hasattr(args, "frontend_conf"):
            if args.frontend_conf is not None and "fs" in args.frontend_conf:
                dest_sample_rate = args.frontend_conf["fs"]
            else:
                dest_sample_rate = 16000
        else:
            dest_sample_rate = 16000