Open Slyne opened 1 year ago
From https://pytorch.org/docs/stable/generated/torch.inference_mode.html
Code run under this mode gets better performance by disabling view tracking and version counter bumps
Looks like we need alternatives to deal with _version
as it does not exist in inference mode.
I suggest that you use torch.no_grad()
as a workaround for now.
From https://pytorch.org/docs/stable/generated/torch.inference_mode.html
Code run under this mode gets better performance by disabling view tracking and version counter bumps
Looks like we need alternatives to deal with
_version
as it does not exist in inference mode.I suggest that you use
torch.no_grad()
as a workaround for now.
Sure.
Hi K2 experts,
I'm trying to add the k2 fast beam decoder to my acoustic model. It works great with torch.inference_mode() set to false. But it raises the below error when I set it to True.
This flag is important in my use case since it greatly accelerates the acoustic model inference speed. Not sure if this flag must be set False in k2?
Any suggestion is appreciated! Thanks!