Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wenet/bin/recognize.py] modify args to be consistent with train #2411

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions wenet/bin/recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def get_args():
help='gpu id for this rank, -1 for cpu')
parser.add_argument('--dtype',
type=str,
default='float32',
choices=['float16', 'float32', 'bfloat16'],
default='fp32',
choices=['fp16', 'fp32', 'bf16'],
help='model\'s dtype')
parser.add_argument('--num_workers',
default=0,
Expand Down Expand Up @@ -228,9 +228,9 @@ def main():
model = model.to(device)
model.eval()
dtype = torch.float32
if args.dtype == 'float16':
if args.dtype == 'fp16':
dtype = torch.float16
elif args.dtype == 'bfloat16':
elif args.dtype == 'bf16':
dtype = torch.bfloat16
logging.info("compute dtype is {}".format(dtype))

Expand Down
Loading