module 'torch' has no attribute 'inference_mode'
#1
by
MonsterMMORPG
- opened
Hi,
You may need to update PyTorch; I did not pin a minimum version in the requirements..
torch.inference_mode
was introduced in PyTorch 1.9.
Hi,
You may need to update PyTorch; I did not pin a minimum version in the requirements..
torch.inference_mode
was introduced in PyTorch 1.9.
hi it worked but looks like i am not using the correct strategy
I gave input like this
the output is not correct
this is the code
from punctuators.models import PunctCapSegModelONNX
m = PunctCapSegModelONNX.from_pretrained("pcs_en")
input_texts = example
results = m.infer(input_texts)
with open('punctuation_fullstop_truecase_english.txt', 'w') as f:
f.writelines(result)
by the way it doesn't work with torch 2. works with torch 1.13