Skip to content

Commit

Permalink
[wekws] fix log (only one process print model) (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: di.wu <[email protected]>
  • Loading branch information
whiteshirt0429 and di.wu authored Oct 9, 2023
1 parent 6ae98ef commit 58859d5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions wekws/bin/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,14 @@ def main():
configs['model']['cmvn'] = {}
configs['model']['cmvn']['norm_var'] = args.norm_var
configs['model']['cmvn']['cmvn_file'] = args.cmvn_file
# Init asr model from configs
model = init_model(configs['model'])
if rank == 0:
saved_config_path = os.path.join(args.model_dir, 'config.yaml')
with open(saved_config_path, 'w') as fout:
data = yaml.dump(configs)
fout.write(data)

# Init asr model from configs
model = init_model(configs['model'])
print(model)
print(model)
num_params = count_parameters(model)
print('the number of model params: {}'.format(num_params))

Expand Down

0 comments on commit 58859d5

Please sign in to comment.