游雁
2023-05-05 5f602de8b6bae6120443dfd787ac9b36f5565a4d
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