You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
After using the Tiny model for training, the saved model file is in pt format
torch.save({"dims": asdict(dims), "model_state_dict": hf_state_dict}, "/root/tiny_v2.pt")
I am trying to convert the model to pt in jit format
import torch
model = torch.load('/root/tiny_v2.pt')
/usr/local/lib64/python3.9/site-packages/torch/jit/_script.py:1241: UserWarning: optimize is deprecated and has no effect. Use `with torch.jit.optimized_execution() instead
warnings.warn(
Traceback (most recent call last):
File "/home/duzg/asr/dzg.py", line 7, in
traced_model = torch.jit.script(model, inputs)
File "/usr/local/lib64/python3.9/site-packages/torch/jit/_script.py", line 1289, in script
return create_script_dict(obj)
File "/usr/local/lib64/python3.9/site-packages/torch/jit/_script.py", line 1020, in create_script_dict
return torch._C.ScriptDict(obj) # type: ignore[attr-defined]
torch.jit.Error: Unable to infer type of dictionary: Dictionary inputs to traced functions must have consistent type. Found Dict[str, int] and Dict[str, Tensor]
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
model https://huggingface.co/openai/whisper-large-v2
The text was updated successfully, but these errors were encountered: