Update bert_gen.py

This commit is contained in:
Stardust·减
2023-09-05 22:34:27 +08:00
committed by GitHub
parent f8ebfe4273
commit 4c25d8aaf7

View File

@@ -43,9 +43,7 @@ def process_line(line):
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', type=str, default="configs/config.json") parser.add_argument('-c', '--config', type=str, default="configs/config.json")
parser.add_argument( parser.add_argument('--num_processes', type=int, default=2')
'--num_processes', type=int, default=1, help='You are advised to set the number of processes to the same as the number of CPU cores'
)
args = parser.parse_args() args = parser.parse_args()
config_path = args.config config_path = args.config
hps = utils.get_hparams_from_file(config_path) hps = utils.get_hparams_from_file(config_path)